Logging configuration optionsedit

log_leveledit

Sets the logging level for the agent.

This option is case-insensitive.

Valid options: ERROR, WARN, INFO, DEBUG, TRACE

DefaultTypeDynamic

INFO

Level

true

Java System PropertiesProperty fileEnvironment

elastic.apm.log_level

log_level

ELASTIC_APM_LOG_LEVEL

log_fileedit

Sets the path of the agent logs. The special value _AGENT_HOME_ is a placeholder for the folder the elastic-apm-agent.jar is in. Example: _AGENT_HOME_/logs/elastic-apm.log

When set to the special value System.out, the logs are sent to standard out.

When logging to a file, it’s content is deleted when the application starts.

DefaultTypeDynamic

System.out

String

false

Java System PropertiesProperty fileEnvironment

elastic.apm.log_file

log_file

ELASTIC_APM_LOG_FILE

enable_log_correlationedit

A boolean specifying if the agent should integrate into SLF4J’s MDC to enable trace-log correlation. If set to true, the agent will set the trace.id and transaction.id for the currently active spans and transactions to the MDC. See Log correlation for more details.

While it’s allowed to enable this setting at runtime, you can’t disable it without a restart.

DefaultTypeDynamic

false

Boolean

true

Java System PropertiesProperty fileEnvironment

elastic.apm.enable_log_correlation

enable_log_correlation

ELASTIC_APM_ENABLE_LOG_CORRELATION