Skip to content

Commit

Permalink
Merge pull request #3371 from arunans23/fix-tests
Browse files Browse the repository at this point in the history
Fix testcase failures related to http access logs
  • Loading branch information
arunans23 authored Jun 24, 2024
2 parents e032de0 + 64aa778 commit ec15749
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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, \
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ec15749

Please sign in to comment.