[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-18 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-730098783 > What format did you have in mind for logging to spans? > * `AbstractSpan` only has `log(Throwable)` and `log(long, Map)`. What type of map would you put there? Just a single key

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-18 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-730096563 > What's the need for starting and stopping a span for adding logging? > * Couldn't you just do `if (ContextManager.isActive()) ContextManager.activeSpan().log(...)` Your

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-18 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-730095830 > * Why save `LoggerContext` to a thread local map instead of pulling it from `objInst`? I don't quite understand what does `objInst` mean? Any method as long as it can obta

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-18 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-730090278 > How did you plan on testing all of these logging frameworks? > * The test class you've created depends on spring-boot-starter-web which defaults to logback. Did you plan on tes

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-18 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-730085599 > Why does `LogbakLoggerFactoryInstrumentation` need to know about `org.slf4j.LoggerFactory`? > * I would assume slf4j wouldn't come into the picture as under the hood it is usi

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-17 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-729419758 # Summary The plug-in can store the logs generated by the program during the call, such as the content of the error log, into the span log. And the plug-in provides matching

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-11-17 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-729341782 Sir, there were a lot of laboratory tasks some time ago, so the progress was a bit slow. Currently, I have written a simple document, and some verification work has not been comple

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702757051 ok, I got it. This is an automated message from the Apache Git Service. To respond to the message, please log on to

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702645540 ok, I got it. If do so, we should add an attribute named `filter` to filter the logs with regular expression. And the `pattern` to control the formate of the logs.Just like this:

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702634591 If intercept `log#error` directly, the content of logs that we can get is unformatted. ```java logger.error("hello world"); ``` **unformatted logs:** hello world

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702617916 Because when after exec the "doAppender()",the logs is assembled. This is an automated message from the Apache Git

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702617069 My initial idea is to use the `doAppender(E e)` method as an insertion point, and then judge and convert the information according to the requirements of the configuration file.

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702613662 As following logbak config file show, the config file define two appenders which has different pattern.If user want to colloct all of them , they may need use multiple expressions.

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702607770 Is this ok? ```yaml logger: - name: "log4j2" packages: - package1 - package2 level: "trace" patterns: ["Regular expression1","Regula

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-02 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702604675 Just like this,is it ok? ```yaml logger: - name: "log4j2" package: ["package1","package2","package3"] level: "trace" pattern: ["Regular expression1","

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-01 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702559991 The config file may be just like this: ```yaml logger:log4j/log4j2/logbak #defalut include all package: package name(for exampleorg.apache.skywalking) level: trace/

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-10-01 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-702551591 ok, I will design a file in the same level directory of the plugin to filter the log categories that need to be recorded. -

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-09-30 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-701920755 @wu-sheng ,Sir, I have a problem about this plugin.Users may be configure more than one appender to collect logs , just like this: ```xml myApp.log

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-09-28 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-65313 ok,I will do it. This is an automated message from the Apache Git Service. To respond to the message, please log on

[GitHub] [skywalking] vcjmhg commented on issue #4545: add error log(log4j,logback) to span log event

2020-09-28 Thread GitBox
vcjmhg commented on issue #4545: URL: https://github.com/apache/skywalking/issues/4545#issuecomment-699979334 Is anyone currently developing this plugin?:smile: This is an automated message from the Apache Git Service. To res