[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-22 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-731921222


   > It looks like the `structure` proposal is better, less performance impact, 
still readable, and has more possibilities in the future. Personally like this. 
@vcjmhg thoughts?
   
   Yes, I also agree that `structured` proposla seems better 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-20 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-731495570


   @wu-sheng @BFergerson , about the plugin, can we make the following 
conclusions:
   1. The format of logging to spans will contain three fields:
   * event=log level(debug/info/...)
   * log.kind=class of the logger
   * message=formated text
   2. `Pattern` will support `%line`  which represents line number from where 
the logging request was issued.
   3. `expression` will be removed. The content of the configuration file is as 
follows:
   ```yaml
   - name: "log4j2"
   packages:
 - package1
 - package2
   level: "trace"
   pattern: "%date %level [%thread] %logger{10} [%file:%line] %msg%n"
   ```
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730940001


   > OK, I got your time. But, regex match would be a big performance impact on 
the target system. The log should follow the same logic as the log filter 
system originally, such as, log level, package name filter, etc. which have 
been included in the log framework.
   
   Ok, if `expression` is not necessary, I will remove it later. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730932116


   @BFergerson , ok,`logback` supports the function that collects the line 
number from where the logging request was issued (the conversion word is 
[`%line`](http://logback.qos.ch/manual/layouts.html)), so I will use 
`PatternLayoutEncoder` which from logback to format logs to test its support 
for this feature .



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730810324


   > Though again, my only question would be whether or not the stack trace was 
always included regardless of log level.
   
   @BFergerson , I am not sure if there will be the following usage in a real 
environment:
   ```java
   logger.debug("has exception",new Exception());
   ```
   And the information just above needs to be recorded in the span log. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730807806


   > Yes, my understanding is `pattern` is the `message` in the log. The 
`expression` still doesn't make sense to me. How do we plan to do that?
   
   The `expression` is mainly to increase the flexibility of the function. In a 
certain situation, we may need to only record log information containing 
certain keywords.For example, we need to record the logging message contains  
"thread name".
   But I don’t know if these scenarios really exist in a production environment.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730394313


   > What is the filter for?
   
   
   Sorry, I made a mistake. It should be `expression` not `filter`  which can 
filter logging information with regular expression 
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730384448


   > I was unaware of the format `AbstractSpan.error()` was already using
   
   @BFergerson,The result of the previous discussion is that we don’t care 
about the format `AbstractSpan.error()` was already using, we will provide 
configuration issues to control the format of the log.
   ```yaml
 - name: "log4j2"
   packages:
 - package1
 - package2
   level: "trace"
   pattern: "%date %level [%thread] %logger{10} [%file:%line] %msg%n"
   filter: "Regular expression"
   ```
   In the above config file, `pattern` will control the format of logging 
information that we need.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730377251


   > Once you've obtained all the information you need to call that method, why 
should you also be storing the logging framework which triggered it? For 
example, why should RocketBot care which logging framework the logs are coming 
from?
   
   Thank you very much for your explanation. If so, It seems that it not 
necessary to record the kind name of the logging framework.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [skywalking] vcjmhg commented on issue #5863: What format should we have in mind for logging to spans?

2020-11-19 Thread GitBox


vcjmhg commented on issue #5863:
URL: https://github.com/apache/skywalking/issues/5863#issuecomment-730354599


   It's good for me to implication it.:smile:
   
   > Another question is, why the log framework matters?
   
   Because some information that cannot be directly obtained by intercepting 
the `logger `trace()` ,  such as the stack trace of the exception associated 
with the logging event. To obtain this information, it must be processed 
separately through different log frameworks. In other words, it is for better 
log formatting function.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org