diff options
Diffstat (limited to 'logging-sdk/src/main/java/org/openo/log/test/logback.xml')
-rw-r--r-- | logging-sdk/src/main/java/org/openo/log/test/logback.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/logging-sdk/src/main/java/org/openo/log/test/logback.xml b/logging-sdk/src/main/java/org/openo/log/test/logback.xml new file mode 100644 index 0000000..4c41c2a --- /dev/null +++ b/logging-sdk/src/main/java/org/openo/log/test/logback.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + <appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender"> + <destination>127.0.0.1:4560</destination> + + <!-- encoder is required --> + <encoder class="net.logstash.logback.encoder.LogstashEncoder" /> + </appender> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <layout class="ch.qos.logback.classic.PatternLayout"> + <Pattern> + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + </Pattern> + </layout> + </appender> + + <root level="debug"> + <appender-ref ref="stash" /> + <appender-ref ref="STDOUT" /> + </root> + +</configuration>
\ No newline at end of file |