Reputation: 865
I turn on LoggingActiveMQServerPlugin in order to record some information. But I don't want those information in artemis.log. I hope those information could be saved into a separated file so that I can manage it easily.
I know I should work with the file logging.properties
, but I don't know how to configure the file. Could anybody provide a samlpe?
Appreciate.
Upvotes: 0
Views: 470
Reputation: 35122
Here's what you need to do:
org.apache.activemq.artemis.core.server.plugin.impl
to the loggers
list.org.apache.activemq.artemis.core.server.plugin.impl
to a new handler
handler
to point to a unique file.For example, this configuration will direct output from the LoggingActiveMQServerPlugin to logging_plugin.log
in the log
directory next to artemis.log
:
...
loggers=...,org.apache.activemq.artemis.core.server.plugin.impl
...
logger.org.apache.activemq.artemis.core.server.plugin.impl.level=ERROR
logger.org.apache.activemq.artemis.core.server.plugin.impl.handlers=LOGGING_PLUGIN
logger.org.apache.activemq.artemis.core.server.plugin.impl.useParentHandlers=false
...
handler.LOGGING_PLUGIN=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
handler.LOGGING_PLUGIN.level=DEBUG
handler.LOGGING_PLUGIN.properties=suffix,append,autoFlush,fileName
handler.LOGGING_PLUGIN.suffix=.yyyy-MM-dd
handler.LOGGING_PLUGIN.append=true
handler.LOGGING_PLUGIN.autoFlush=true
handler.LOGGING_PLUGIN.fileName=${artemis.instance}/log/logging_plugin.log
handler.LOGGING_PLUGIN.formatter=PATTERN
Upvotes: 1