-
Notifications
You must be signed in to change notification settings - Fork 24
bundle logging is not working #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hey @zeitlinger thanks for the report. So at this moment we use Java's own logging facility, similar to what the SpecialAgent is doing. However, I've wondered in the past about using slf4j as the rest of the actual LS Tracer uses it. I will take a stab in the next few days. |
@carlosalberto, SpecialAgent actually uses its own home grown logging facility. This was done because reliance on Java Logging led to configuration conflicts with target applications, as well as a mixed bag of class loading issues. SpecialAgent must tread lightly with regard to its reliance on 3rd-party libs, because those libs may be present in the target application. As for the LightStep Tracer Plugin, it should not be a problem to import slf4j libs. This is because Tracer Plugins are loaded in isolated class loaders that should not interfere with the target application. I say "should not", because: In the case of Spring or Spring Boot, the Spring runtime scans all loaders for beans and components. If the 3rd-party lib in question is in some way related to Spring, then Spring will try to load it. I do not believe that slf4j would cause such a situation. |
@safris Fantastic, thanks for chiming in. So I will update the build to include/load the slf4j dependency. |
I've tried this locally as well by adding this to the bundle:
This logs everything INFO and higher, which is the default for java logging. Setting the verbosity to 4 (debug) has no effect, however. Makes me wonder why we have the duality (verbosity on the one hand and logging levels on the other) - very confusing without any apparent benefit as far as I can see. |
hey @zeitlinger I will double check the entire code base. This is "legacy code" to some degree so I'm not sure about the actual reasons, but will be doing a full pass on the Java codebase. |
Hi @carlosalberto, is there an update re this issue? |
Hey @zeitlinger I've prepared a small PR that makes the bundle part that loads the LS
Could you clarify this part? sl4fj-simple is the only artifact with the INFO-and-upper limitation, so I guess you are referring about something else (including the verbosity vs logging levels). FYI, I'm keeping the logging logic in the Let me know what you think and I will fix this up in the next 1-2 days. |
great!
my comment is not related to sl4fj-simple specifically. These are the 2 places where a log statement can be suppressed i.e. we could either
yes, that makes sense as far as I understand |
@zeitlinger It would make sense, to get rid of Also I request you to checkout #229. |
Hi @carlosalberto, is there an update to this issue? |
Hi @zeitlinger, is this issue still relevant? |
yes |
Hi @carlosalberto, is there an update to this issue? |
The bundle does not have an slf4j implementation, hence logging is completely turned off, regardless of
ls.verbosity
.Since
lightstep-tracer-jre-bundle
is self sufficient, it must provide an implementation of slf4j.The text was updated successfully, but these errors were encountered: