diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2017-09-14 15:15:45 -0700 |
---|---|---|
committer | Marcus G K Williams <marcus.williams@intel.com> | 2017-09-14 15:15:53 -0700 |
commit | dc299ed815e4e92e178f9fd6ae19f8cd50ad0647 (patch) | |
tree | 8abe8df9b5bfcd761e3518217e38f333949cc964 /odlsli/src/main/resources | |
parent | a49cc5f26acf1914eda8ef5ec92b4224c173cf80 (diff) |
Add Graph/Node to org.ops4j.pax.logging.cfg
This change adds org.ops4j.pax.logging.cfg
file that contains standard ODL logging
config with added sections for 'Directed Graph
Node Id appender' and 'Directed Graph Name
appender'. Addition of these sections should
allow current Graph and Node Id to be appended
to karaf log using MDC.
Issue-Id: CCSDK-71
Change-Id: Id62ba038fbe6bb51e2c58f6a415a860cfa11dd89
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'odlsli/src/main/resources')
-rw-r--r-- | odlsli/src/main/resources/org.ops4j.pax.logging.cfg | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/odlsli/src/main/resources/org.ops4j.pax.logging.cfg b/odlsli/src/main/resources/org.ops4j.pax.logging.cfg new file mode 100644 index 00000000..7a575e4a --- /dev/null +++ b/odlsli/src/main/resources/org.ops4j.pax.logging.cfg @@ -0,0 +1,64 @@ +# Root logger +log4j.rootLogger=INFO, async, directed-graph-node-id, directed-graph, osgi:* +log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer + +# CONSOLE appender not used by default +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n + +# Async appender forwarding to file appender +log4j.appender.async=org.apache.log4j.AsyncAppender +log4j.appender.async.appenders=out + +# File appender +log4j.appender.out=org.apache.log4j.RollingFileAppender +log4j.appender.out.layout=org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n +log4j.appender.out.file=${karaf.data}/log/karaf.log +log4j.appender.out.append=true +log4j.appender.out.maxFileSize=1MB +log4j.appender.out.maxBackupIndex=10 + +# Directed Graph Node Id appender +log4j.appender.directed-graph-node-id=org.apache.log4j.sift.MDCSiftingAppender +log4j.appender.directed-graph-node-id.key=nodeId +log4j.appender.directed-graph-node-id.default=unknown +log4j.appender.directed-graph-node-id.appender=org.apache.log4j.FileAppender +log4j.appender.directed-graph-node-id.appender.layout=org.apache.log4j.PatternLayout +log4j.appender.directed-graph-node-id.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %X{nodeId} | %m%n +log4j.appender.directed-graph-node-id.appender.file=${karaf.data}/log/$\\{nodeId\\}.log +log4j.appender.directed-graph-node-id.appender.append=true + +# Directed Graph Name appender +log4j.appender.directed-graph=org.apache.log4j.sift.MDCSiftingAppender +log4j.appender.directed-graph.key=currentGraph +log4j.appender.directed-graph.default=unknown +log4j.appender.directed-graph.appender=org.apache.log4j.FileAppender +log4j.appender.directed-graph.appender.layout=org.apache.log4j.PatternLayout +log4j.appender.directed-graph.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %X{currentGraph} | %m%n +log4j.appender.directed-graph.appender.file=${karaf.data}/log/$\\{currentGraph\\}.log +log4j.appender.directed-graph.appender.append=true + +# Sift appender +log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender +log4j.appender.sift.key=bundle.name +log4j.appender.sift.default=karaf +log4j.appender.sift.appender=org.apache.log4j.FileAppender +log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout +log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n +log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log +log4j.appender.sift.appender.append=true + +# syslog appender for exporting karaf messages to a syslog server +# To enable the syslog appender, add it to the log4j.rootLogger list above. +# +# Make sure to set log4j.appender.syslog.syslogHost in the format: +# <syslogHost>:<syslogPort> +# If no port is specified, the default, 514, is assumed. +log4j.appender.syslog=org.apache.log4j.net.SyslogAppender +log4j.appender.syslog.layout=org.apache.log4j.PatternLayout +log4j.appender.syslog.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %X{currentGraph} | %X{nodeId} | %m%n +log4j.appender.syslog.syslogHost=127.0.0.1 +log4J.appender.syslog.facility=KARAF +log4j.appender.syslog.facilityPrinting=false |