Update log4j2 file with corrleation logs
Add the corrleation properties by default to log4j2 prop file so that we can simply enable
correlation logs using system properties and view
Fixes
# list of all appenders
#add entry "syslog" to use the syslog appender
-appenders = CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, osgi, SERVICE_LOGFILE, ERROR_LOGFILE
+appenders = CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, osgi, SERVICE_LOGFILE, ERROR_LOGFILE, CORRELATION
#, syslog
# CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout.
@@ -150,7 +150,8 @@ appender.CARBON_TRACE_LOGFILE.strategy.max = 20
# Appender config to put correlation Log.
appender.CORRELATION.type = RollingFile
appender.CORRELATION.name = CORRELATION
-appender.CORRELATION.fileName =${carbon.home}/repository/logs/${instance.log}/correlation.log
+appender.CORRELATION.fileName =${sys:carbon.home}/repository/logs/correlation.log
+appender.CORRELATION.filePattern =${sys:carbon.home}/repository/logs/correlation-%d{MM-dd-yyyy}.log
appender.CORRELATION.layout.type = PatternLayout
appender.CORRELATION.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS}|%X{Correlation-ID}|%t|%m%n
appender.CORRELATION.policies.type = Policies
@@ -191,7 +192,7 @@ loggers = AUDIT_LOG, SERVICE_LOGGER, trace-messages, org-apache-coyote, com-haze
BlueprintExtender, ModuleDeployer, VFSTransportSender, PassThroughHttpSender, PassThroughHttpSSLSender, \
PassThroughHttpListener, PassThroughHttpSSLListener, DeploymentEngine, TaskServiceImpl, SynapseControllerFactory, \
Axis2SynapseController, MultiXMLConfigurationBuilder, XMLConfigurationBuilder, \
- VFSTransportListener, NTaskTaskManager, MediationStatisticsComponent, SynapseConfigurationBuilder, ServerManager
+ VFSTransportListener, NTaskTaskManager, MediationStatisticsComponent, SynapseConfigurationBuilder, ServerManager, correlation
# Uncomment the following section and comment the above for verbose logging
#loggers = AUDIT_LOG, SERVICE_LOGGER, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, \
@@ -207,7 +208,7 @@ loggers = AUDIT_LOG, SERVICE_LOGGER, trace-messages, org-apache-coyote, com-haze
# org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, \
# org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, \
# JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, \
-# ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector
+# ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, correlation
# Info logs for following loggers are disabled to improve performance
logger.ModuleDeployer.name = org.apache.axis2.deployment.ModuleDeployer
