Some replies to the questions in the PR ticket, 1. Logging in JSON format or structured logging is undoubtedly trendy and has been extensively used. In Go, the logging framework `zap` and `logrus` support JSON format as a first-class feature. For Java, `logstash-logback-encoder` is also designed to generate JSON format logs. Also, the stacktrace is not friendly as multiline strings.
2. Analysis logs can be useful while something unexpected happens. Concerning the performance issue mentioned by Xin in this post, I have added a micro-benchmark, it shows a simple "Hello World" log spends approx. ~1700 ns/op for PatternLogger while for JsonPattern the average is about ~2400 ns/op which I suppose is not a large overhead. Additionally, I want to stress that in our use cases, we want to unify the format of all logs across the application, including both the agent part and real "payload". Jiajing On 2020/08/20 03:07:47, Sheng Wu <[email protected]> wrote: > Hi Dev team > > We received a pull request, https://github.com/apache/skywalking/pull/5357 > which is trying to add a JSON format log. I want to get feedback from the > dev team, is this really necessary? And how is this helpful? > > Sheng Wu 吴晟 > Twitter, wusheng1108 >
