From 8410248bcd7d3c79d208a02a2f6147ce2cb38c61 Mon Sep 17 00:00:00 2001 From: Mateusz Rzeszutek Date: Sat, 22 Apr 2023 08:03:10 +0200 Subject: [PATCH] Document the new otel.javaagent.logging setting (#2618) Co-authored-by: Phillip Carter --- .../java/automatic/agent-config.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/en/docs/instrumentation/java/automatic/agent-config.md b/content/en/docs/instrumentation/java/automatic/agent-config.md index 61908316fe3e..625897b8b4cf 100644 --- a/content/en/docs/instrumentation/java/automatic/agent-config.md +++ b/content/en/docs/instrumentation/java/automatic/agent-config.md @@ -79,6 +79,28 @@ extension. {{% /config_option %}} +### Javaagent logging output + +The agent's logging output can be configured by setting the following property: + +{{% config_option name="otel.javaagent.logging" %}} + +The javaagent logging mode. The following 3 modes are supported: + +- `simple`: The agent will print out its logs using the standard error stream. + Only `INFO` or higher logs will be printed. This is the default javaagent + logging mode. +- `none`: The agent will not log anything - not even its own version. +- `application`: The agent will attempt to redirect its own logs to the + instrumented application's slf4j logger. This works the best for simple + one-jar applications that do not use multiple classloaders; Spring Boot apps + are supported as well. The javaagent output logs can be further configured + using the instrumented application's logging configuration (e.g. `logback.xml` + or `log4j4.xml`). **Make sure to test that this mode works for your + application before running it in a production environment.** + +{{% /config_option %}} + ## Common instrumentation configuration Common settings that apply to multiple instrumentations at once.