## ---------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements.  See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License.  You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------

#
# When debugging or reporting problems to the ActiveMQ team,
# change rootLogger level to DEBUG
#
rootLogger.level=INFO
rootLogger.appenderRef.console.ref=Console
rootLogger.appenderRef.console.filter.threshold.type=ThresholdFilter
rootLogger.appenderRef.console.filter.threshold.level=INFO
rootLogger.appenderRef.logfile.ref=RollingFile

# Loggers configuration

# ActiveMQ Spring
logger.spring.name=org.apache.activemq.spring
logger.spring.level=WARN

# ActiveMQ web
logger.web.name=org.apache.activemq.web.handler
logger.web.level=WARN

# Spring
logger.springframework.name=org.springframework
logger.springframework.level=WARN

# XBean
logger.xbean.name=org.apache.xbean
logger.xbean.level=WARN

# Jetty
logger.jetty.name=org.eclipse.jetty
logger.jetty.level=WARN

# ActiveMQ
#log4j2.logger.activemq.name=org.apache.activemq
#log4j2.logger.activemq.level=DEBUG

# Appender configuration

# Console appender
appender.console.type=Console
appender.console.name=Console
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%5p | %m%n

# File appender
appender.logfile.type=RollingRandomAccessFile
appender.logfile.name=RollingFile
appender.logfile.fileName=${sys:activemq.data}/activemq.log
appender.logfile.filePattern=${sys:activemq.data}/activemq.log.%i
appender.logfile.append=true
appender.logfile.layout.type=PatternLayout
appender.logfile.layout.pattern=%d | %-5p | %m | %c | %t%n%throwable{full}
appender.logfile.policies.type=Policies
appender.logfile.policies.size.type=SizeBasedTriggeringPolicy
appender.logfile.policies.size.size=1MB

# you can control the rendering of exception in the pattern
# by default, we display the full stack trace
# if you want to display short form of the exception, you can use
#
# log4j2.appender.logfile.layout.pattern=%d | %-5p | %m | %c | %t%n%throwable{short}
#
# a classic issue with filebeat/logstash is about multiline exception. The following pattern 
# allows to work smoothly with filebeat/logstash
#
# log4j2.appender.logfile.layout.pattern=%d | %-5p | %m | %c | %t%n%replace(%throwable){\n}{ }
#

# use some of the following patterns to see MDC logging data
#
# %X{activemq.broker}
# %X{activemq.connector}
# %X{activemq.destination}
#
# e.g.
#
# log4j2.appender.logfile.layout.pattern=%d | %-20.20X{activemq.connector} | %-5p | %m | %c | %t%n

###########
# Audit log
###########
logger.audit.name=org.apache.activemq.audit
logger.audit.additivity=false
logger.audit.level=INFO
logger.audit.appenderRef.auditlog.ref=AuditLog

appender.auditlog.type=RollingRandomAccessFile
appender.auditlog.name=AuditLog
appender.auditlog.fileName=${sys:activemq.data}/audit.log
appender.auditlog.filePattern=${sys:activemq.data}/audit.log.%i
appender.auditlog.append=true
appender.auditlog.layout.type=PatternLayout
appender.auditlog.layout.pattern=%-5p | %m | %t%n
appender.auditlog.policies.type=Policies
appender.auditlog.policies.size.type=SizeBasedTriggeringPolicy
appender.auditlog.policies.size.size=1MB
