Log4j2 Syslog appender(TCP protocol) sending exception stacktrace in multiple line and shwoing wrong log levels -
I am using log4j2 and syslog appenders. I am using TCP as a protocol. And while sending the Kiwi system log server error messages, exceptions are being sent in multiple rows on the Stacktrace TCP, the first line of one packet stacktrace in each row is reversing the correct log level in the Kiwi Sesog server, but after the same stacktrace Wrong log level and feature are being repeated. This is not happening in the case of UDP protocol.
01-22-2015 10:25:40 local0.jpg 10.74.224.251 1 2015-01 -23T00: 20: 11.473 + 05: 30 ABC-PC - - [MDC @ 1000 class = "com.test.dataSender" exception = "" thread = "ForkJoinPool-57-worker-1"] [8ef587c9-5605-42d3 -88ff-0d865cf6e510]: management Services provide ' A 'failed, because: AA 01-22-2015 10:25:39 local 7. Debug 10.74.224.251 "thread =" fork joinpool-57-employee-1 "] [8ef587c9 -5605-42d3-88ff- 0d865cf6e510]: unknown host: 01/22/2015 at java.util.concurrent.ForkJoinWorkerThread.run (ForkJoinWorkerThread.java:398) 10:25:39 Local7.Debug 10.74.224.251 01-22 -2015 10:25:39 Local 7. Debug 10.74.224.251 on java.util.concurrent.ForkJoinPool.work (ForkJoinPool.java:646) 01 -22-2015 10:25:39 Local 7. Debug 10.74.224.251 at java.util .concurrent.ForkJoinPool.scan (ForkJoinPool.java:784) 01-22-2015 10:25:39 Local 7. Debug 10.74.224.251 Local7.Debug 10.74 on oncurrent.ForkJoinWorkerThread.execTask (ForkJoinWorkerThread.java:604) 2015/01/22 10:25:39 java.util.concurrent.ForkJoinTask.doExec (ForkJoinTask.java:334) on java.util.c. 224.251 2015/01/22 10:25:39 Local 7. Debug 10.74.224.251 on java.util.concurrent.RecursiveTask.exec (RecursiveTask.java:93) 01-22-2015 10:25:39 Local 7. Debug 10.74 .224.251 at com.test.data .core.mapreduce.MapReduceTask.compute (MapReduceTask.java:26) 2015/01/22 10:25:39 Local7.Debug 10.74.224.251 com.test.data.core.datasource.DatasourceAdder .map (at datasourceAdder.java: 21) 01-22-2015 10:25:39 local 7.debug 10.74.224.251 com.test.data.core.datasource.DatasourceAdder.map (dataset Su. Java: 70) 01-22-2015 10:25:39 Local 7 .Debug 10.74.224.251 com.test.data.um.datasource.UMDatasourceService.addDatasources (UMDatasourceService.java:58) 01-22-2015 10:25: 39 local 7kdibg 10.74.224.251 com.test.data.um on .datasource.UMDatasourceServiceFacad eImpl.addDatasources (UMDatasourceServiceFacadeImpl.java:211) 2015/01/22 10:25:39 Local7.Debug 10.74.224.251 com.test. 01-22 on data.um.datasource.UMDatasourceServiceFacadeImpl.discoverDatasources (UMDatasourceServiceFacadeImpl.java:248) -2015 10:25:39 local 7kdibg 10.74.224.251 java.net.InetAddress.getByName (InetAddress.java:1048) 01- 22-2015 10:25:39 Local 7. Debug 10.74.224.251 at java.net.InetAddress .getAllByName (InetAddress.java:1098) 01-22-2015 10:25:39 Local 7. Debug 10.74.224.251 java.net .net.net Address: 246) java.net.InetAddress.getAddressesFromNameService on 2015/01/22 10:25:39 Local7.Debug 10.74.224.251 (Local7.Debug on InetAddress.java 10.74.224.251: 1293) 01-22-2015 10:25:39 cal7 local 7kdibg 10.74.224.251 take on java.net.InetAddress $ 1.lookupAllHostAddr (InetAddress.java:901) 01-22-2015 10:25:39 java.net.Inet4AddressImpl.lookupAllHostAddr (Native method). Debug 10.74.224.251 2015/01/22 10:25:39 Local0.Error 10.74.224.251 1 2015-01-23T00: 20: 11.471 + 05:30 ABC PC [Oncond API Services] - - [MDC @ 1000 class = " Com.test.data.um.datasource.UMDatasourceServiceFacadeImpl "exception =" java.net.UnknownHostException: AA about another question about [mdc @ 1000 what is this? Why is it being printed in the included MDC = true in the log4j2 config file?
& lt; Syslog name = "syslogAppender" host = "$ {Sys: syslog.host}" port = "$ {sys: syslog.port}" protocol = "$ {sys: syslog.protocol}" appName = "$ {serviceName}" Enabled = "$ {sys: syslog.enabled}" format = "RFC5424" newLine = "true" include MDC = "true" MDCID = "MDC" unblocked exception = "true" enterprise number = "1000" Gt; & Lt; LoggerFields & gt; & Lt; KeyValuePair key = "Thread" value = "% t" /> & Lt; KeyValuePair key = "category" value = "% c" / & gt; & Lt; KeyValuePair key = "Exception" value = "% ex {full}" /> & Lt; / LoggerFields & gt; & Lt; / Syslog & gt;
Comments
Post a Comment