Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion content/en/tracing/trace_collection/library_config/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ When `true`, debug mode for the Datadog Java Tracer is enabled.
`datadog.slf4j.simpleLogger.jsonEnabled`
: **Environment Variable**: Not available<br>
**Default**: `false`<br>
When `true`, Datadog Java tracer logs are written in JSON. Available for versions 1.48.0+.
When `true`, Datadog Java tracer logs are written in JSON. Available for versions 1.48.0+.<br>
**Note**: This setting is specific to the embedded SLF4J simple logger and does not support environment variables. `dd.log.format.json` is the preferred configuration option.

`dd.trace.servlet.principal.enabled`
: **Environment Variable**: `DD_TRACE_SERVLET_PRINCIPAL_ENABLED`<br>
Expand Down Expand Up @@ -364,6 +365,18 @@ A range of errors can be accepted. By default, gRPC status codes 2 to 16 are rep

### Logs

`dd.log.level`
: **Environment Variable**: `DD_LOG_LEVEL`<br>
**Default**: `INFO`<br>
Sets the internal log level for the Datadog Java Tracer. Valid values: `DEBUG`, `INFO`, `WARN`, `ERROR`.<br>
Available since version 1.36.0

`dd.log.format.json`
: **Environment Variable**: `DD_LOG_FORMAT_JSON`<br>
**Default**: `false`<br>
When `true`, outputs Datadog Java Tracer logs in a JSON format compatible with the Datadog Logs UI.<br>
Available since version 1.58.0

`dd.logs.injection`
: **Environment Variable**: `DD_LOGS_INJECTION`<br>
**Default**: `true`<br>
Expand Down
1 change: 1 addition & 0 deletions content/en/tracing/troubleshooting/tracer_debug_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ To enable debug mode for the Datadog Java Tracer, set the flag `-Ddd.trace.debug
```
-Ddatadog.slf4j.simpleLogger.jsonEnabled=true
```
Since version `1.58.0`, you can use the `DD_LOG_FORMAT_JSON` environment variable to control the Datadog Java Tracer log format.


[1]: https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html
Expand Down
Loading