dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

fix: #1109

Open AndesKrrrrrrrrrrr opened this issue 1 year ago • 4 comments

The default time format is causing issues for automatic log parsing.

See https://github.com/DataDog/dd-trace-java/issues/1109#issuecomment-1590056133

AndesKrrrrrrrrrrr avatar Apr 23 '24 12:04 AndesKrrrrrrrrrrr

Hi @AndesKrrrrrrrrrrr

Thanks for you contribution! I will try to find what’s the impact of this change to make sure it won’t break any other features. In the same time, can you run ./gradlew :dd-java-agent:agent-bootstrap:spotlessApply to fix formatting and allow the CI tests to run? Thanks

PerfectSlayer avatar Apr 23 '24 13:04 PerfectSlayer

The agent should also be logging to std out not std err to fully resolve #1109

JKomoroski avatar Jun 19 '24 17:06 JKomoroski

The agent should also be logging to std out not std err to fully resolve #1109

Note the tracer logs to stderr by default because that's the appropriate channel for diagnostics output, so it can be easily filtered from the application output. That's why the default for https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html and https://docs.oracle.com/en/java/javase/20/docs/api/java.logging/java/util/logging/ConsoleHandler.html is System.err

See also https://en.wikipedia.org/wiki/Stderr

mcculls avatar Jun 19 '24 19:06 mcculls

The agent should also be logging to std out not std err to fully resolve #1109

Note the tracer logs to stderr by default because that's the appropriate channel for diagnostics output, so it can be easily filtered from the application output. That's why the default for https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html and https://docs.oracle.com/en/java/javase/20/docs/api/java.logging/java/util/logging/ConsoleHandler.html is System.err

See also https://en.wikipedia.org/wiki/Stderr

This seems correct, but it is not consistent with how Datadog's own systems actually handle Stderr. All messages to Stderr appear to be tracked as errors in the web ui no matter the log level in the message messages (afaik).

Is the problem that the agent logs to stderr or is the problem that the datadog log system treats all messages to stderr as an error? I thought the former.

JKomoroski avatar Jun 19 '24 20:06 JKomoroski

I've lost context, this is old, and no time to clean it up. Closing

AndesKrrrrrrrrrrr avatar Oct 18 '24 15:10 AndesKrrrrrrrrrrr