diff --git a/integration/management-api-tests/src/test/resources/artifacts/ESB/server/conf/log4j2.properties b/integration/management-api-tests/src/test/resources/artifacts/ESB/server/conf/log4j2.properties index 47c0461078..489f085c8f 100644 --- a/integration/management-api-tests/src/test/resources/artifacts/ESB/server/conf/log4j2.properties +++ b/integration/management-api-tests/src/test/resources/artifacts/ESB/server/conf/log4j2.properties @@ -37,7 +37,7 @@ # list of all appenders #add entry "syslog" to use the syslog appender -appenders = CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, AUDIT_LOGCONSOLE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, osgi, SERVICE_LOGFILE, API_LOGFILE, ERROR_LOGFILE, CORRELATION +appenders = CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, AUDIT_LOGCONSOLE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, osgi, SERVICE_LOGFILE, API_LOGFILE, ERROR_LOGFILE, CORRELATION, HTTP_ACCESS_LOGFILE #, syslog # CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout. @@ -66,6 +66,24 @@ appender.CARBON_LOGFILE.strategy.max = 20 appender.CARBON_LOGFILE.filter.threshold.type = ThresholdFilter appender.CARBON_LOGFILE.filter.threshold.level = DEBUG +# Appender config to HTTP access logs +appender.HTTP_ACCESS_LOGFILE.type = RollingFile +appender.HTTP_ACCESS_LOGFILE.name = HTTP_ACCESS_LOGFILE +appender.HTTP_ACCESS_LOGFILE.fileName = ${sys:logfiles.home}/http_access.log +appender.HTTP_ACCESS_LOGFILE.filePattern = ${sys:logfiles.home}/http_access_%d{yyyy-MM-dd}.log +appender.HTTP_ACCESS_LOGFILE.layout.type = PatternLayout +appender.HTTP_ACCESS_LOGFILE.layout.pattern = %msg%n +appender.HTTP_ACCESS_LOGFILE.policies.type = Policies +appender.HTTP_ACCESS_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy +appender.HTTP_ACCESS_LOGFILE.policies.time.interval = 1 +appender.HTTP_ACCESS_LOGFILE.policies.time.modulate = true +appender.HTTP_ACCESS_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy +appender.HTTP_ACCESS_LOGFILE.policies.size.size=1MB +appender.HTTP_ACCESS_LOGFILE.strategy.type = DefaultRolloverStrategy +appender.HTTP_ACCESS_LOGFILE.strategy.max = 20 +appender.HTTP_ACCESS_LOGFILE.filter.threshold.type = ThresholdFilter +appender.HTTP_ACCESS_LOGFILE.filter.threshold.level = DEBUG + # AUDIT_LOGCONSOLE is set to be a ConsoleAppender using a PatternLayout. appender.AUDIT_LOGCONSOLE.type = Console appender.AUDIT_LOGCONSOLE.name = AUDIT_LOGCONSOLE @@ -196,7 +214,7 @@ appender.CORRELATION.filter.threshold.level = INFO #appender.syslog.filter.threshold.type = ThresholdFilter #appender.syslog.filter.threshold.level = DEBUG -loggers = AUDIT_LOG, SERVICE_LOGGER, API_LOGGER, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, \ +loggers = AUDIT_LOG, SERVICE_LOGGER, API_LOGGER, PassThroughAccess, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, \ org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, \ org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, \ org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, \ @@ -435,6 +453,12 @@ logger.correlation.level = INFO logger.correlation.appenderRef.CORRELATION.ref = CORRELATION logger.correlation.additivity = false +logger.PassThroughAccess.name = org.apache.synapse.transport.http.access +logger.PassThroughAccess.level = DEBUG +logger.PassThroughAccess.appenderRef.HTTP_ACCESS_LOGFILE.ref = HTTP_ACCESS_LOGFILE +logger.PassThroughAccess.additivity = false + + #Hive Related Log configurations logger.DataNucleus.name = DataNucleus logger.DataNucleus.level = ERROR diff --git a/integration/mediation-tests/tests-patches/src/test/resources/artifacts/ESB/passthru/transport/httpaccesslogs/access-log.properties b/integration/mediation-tests/tests-patches/src/test/resources/artifacts/ESB/passthru/transport/httpaccesslogs/access-log.properties index d4030fdf90..dd2ccbb6a5 100644 --- a/integration/mediation-tests/tests-patches/src/test/resources/artifacts/ESB/passthru/transport/httpaccesslogs/access-log.properties +++ b/integration/mediation-tests/tests-patches/src/test/resources/artifacts/ESB/passthru/transport/httpaccesslogs/access-log.properties @@ -33,6 +33,9 @@ access_log_prefix=http_access_ # file suffix access_log_suffix=.log +# enable or disable access logging to a custom file +access_log_enable=true + # file date format access_log_file_date_format=yyyy-MM-dd