Skip to content

Commit

Permalink
Document the new otel.javaagent.logging setting (#2618)
Browse files Browse the repository at this point in the history
Co-authored-by: Phillip Carter <[email protected]>
  • Loading branch information
Mateusz Rzeszutek and cartermp authored Apr 22, 2023
1 parent 30be1cc commit 8410248
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions content/en/docs/instrumentation/java/automatic/agent-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8410248

Please sign in to comment.