Package org.apache.catalina.valves

Examples of org.apache.catalina.valves.AccessLogValve$DateAndTimeElement


    public String createAccessLoggerValve(String parent)
        throws Exception {

        ObjectName pname = new ObjectName(parent);
        // Create a new AccessLogValve instance
        AccessLogValve accessLogger = new AccessLogValve();
        ContainerBase containerBase = getParentContainerFromParent(pname);
        // Add the new instance to its parent component
        containerBase.addValve(accessLogger);
        ObjectName oname = accessLogger.getObjectName();
        return (oname.toString());

    }
View Full Code Here


    public String createAccessLoggerValve(String parent)
        throws Exception {

        ObjectName pname = new ObjectName(parent);
        // Create a new AccessLogValve instance
        AccessLogValve accessLogger = new AccessLogValve();
        ContainerBase containerBase = getParentContainerFromParent(pname);
        // Add the new instance to its parent component
        containerBase.addValve(accessLogger);
        ObjectName oname = accessLogger.getObjectName();
        return (oname.toString());

    }
View Full Code Here

    static Valve createAccessLogValve(final Container container, final String logDirectory, final ModelNode element) {
        boolean extended = false;
        if (element.hasDefined(Constants.EXTENDED)) {
            extended = element.get(Constants.EXTENDED).asBoolean();
        }
        final AccessLogValve log;
        if (extended) {
            log = new ExtendedAccessLogValve();
        } else {
            log = new AccessLogValve();
        }
        log.setDirectory(logDirectory);
        if (element.hasDefined(Constants.RESOLVE_HOSTS)) log.setResolveHosts(element.get(Constants.RESOLVE_HOSTS).asBoolean());
        if (element.hasDefined(Constants.ROTATE)) log.setRotatable(element.get(Constants.ROTATE).asBoolean());
        if (element.hasDefined(Constants.PATTERN)) {
            log.setPattern(element.get(Constants.PATTERN).asString());
        } else {
            log.setPattern("common");
        }
        if (element.hasDefined(Constants.PREFIX)) log.setPrefix(element.get(Constants.PREFIX).asString());
        return log;
    }
View Full Code Here

    public String createAccessLoggerValve(String parent)
        throws Exception {

        ObjectName pname = new ObjectName(parent);
        // Create a new AccessLogValve instance
        AccessLogValve accessLogger = new AccessLogValve();
        ContainerBase containerBase = getParentContainerFromParent(pname);
        // Add the new instance to its parent component
        containerBase.addValve(accessLogger);
        ObjectName oname = accessLogger.getObjectName();
        return (oname.toString());

    }
View Full Code Here

    static Valve createAccessLogValve(final Container container, final String logDirectory, final ModelNode element) {
        boolean extended = false;
        if (element.hasDefined(Constants.EXTENDED)) {
            extended = element.get(Constants.EXTENDED).asBoolean();
        }
        final AccessLogValve log;
        if (extended) {
            log = new ExtendedAccessLogValve();
        } else {
            log = new AccessLogValve();
        }
        log.setDirectory(logDirectory);
        if (element.hasDefined(Constants.RESOLVE_HOSTS)) log.setResolveHosts(element.get(Constants.RESOLVE_HOSTS).asBoolean());
        if (element.hasDefined(Constants.ROTATE)) log.setRotatable(element.get(Constants.ROTATE).asBoolean());
        if (element.hasDefined(Constants.PATTERN)) {
            log.setPattern(element.get(Constants.PATTERN).asString());
        } else {
            log.setPattern("common");
        }
        if (element.hasDefined(Constants.PREFIX)) log.setPrefix(element.get(Constants.PREFIX).asString());
        return log;
    }
View Full Code Here

     */
    public String createAccessLoggerValve(String parent)
        throws Exception {

        // Create a new AccessLogValve instance
        AccessLogValve accessLogger = new AccessLogValve();

        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        String type = pname.getKeyProperty("type");
        Server server = ServerFactory.getServer();
View Full Code Here

        tomcat.getHost().setAppBase(appBase.getAbsolutePath());

        accessLogEnabled = Boolean.parseBoolean(
            System.getProperty("tomcat.test.accesslog", "false"));
        if (accessLogEnabled) {
            AccessLogValve alv = new AccessLogValve();
            alv.setDirectory(getBuildDirectory() + "/logs");
            alv.setPattern("%h %l %u %t \"%r\" %s %b %I %D");
            tomcat.getHost().getPipeline().addValve(alv);
        }
    }
View Full Code Here

    public String createAccessLoggerValve(String parent)
        throws Exception {

        ObjectName pname = new ObjectName(parent);
        // Create a new AccessLogValve instance
        AccessLogValve accessLogger = new AccessLogValve();
        ContainerBase containerBase = getParentContainerFromParent(pname);
        // Add the new instance to its parent component
        containerBase.addValve(accessLogger);
        ObjectName oname = accessLogger.getObjectName();
        return (oname.toString());

    }
View Full Code Here

          }
        });
      }

      if (this.accessLogEnabled) {
        AccessLogValve valve = new AccessLogValve();
        String accessLogPattern = getAccessLogPattern();
        if (accessLogPattern != null) {
          valve.setPattern(accessLogPattern);
        }
        else {
          valve.setPattern("common");
        }
        valve.setSuffix(".log");
        factory.addContextValves(valve);
      }
      if (getUriEncoding() != null) {
        factory.setUriEncoding(getUriEncoding());
      }
View Full Code Here

    public String createAccessLoggerValve(String parent)
        throws Exception {

        ObjectName pname = new ObjectName(parent);
        // Create a new AccessLogValve instance
        AccessLogValve accessLogger = new AccessLogValve();
        ContainerBase containerBase = getParentContainerFromParent(pname);
        // Add the new instance to its parent component
        containerBase.addValve(accessLogger);
        ObjectName oname = accessLogger.getObjectName();
        return (oname.toString());

    }
View Full Code Here

TOP

Related Classes of org.apache.catalina.valves.AccessLogValve$DateAndTimeElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.