From ab64bdeb1590a9e4dce11163e81f3f4b52be1ff2 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 22 Jul 2024 12:29:48 +0200 Subject: [PATCH] update documentation --- docs/troubleshooting.asciidoc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc index 5c21c3f43..2e9d962f0 100644 --- a/docs/troubleshooting.asciidoc +++ b/docs/troubleshooting.asciidoc @@ -40,7 +40,7 @@ The easiest way to get debug information from the Agent, regardless of the way i Specifying at least one of the following environment variables will ensure the agent logs to a file -`ELASTIC_OTEL_LOG_LEVEL` _(optional)_:: +`OTEL_LOG_LEVEL` _(optional)_:: The log level at which the profiler should log. Valid values are @@ -56,16 +56,16 @@ The default value is `warn`. More verbose log levels like `trace` and `debug` ca affect the runtime performance of profiler auto instrumentation, so are recommended _only_ for diagnostics purposes. -`ELASTIC_OTEL_LOG_DIRECTORY` _(optional)_:: +NOTE: if `ELASTIC_OTEL_LOG_TARGETS` is not explicitly set to include `file` global file logging will only +be enabled when configured with `trace` or `debug`. -The directory in which to write profiler log files. If unset, defaults to +`OTEL_DOTNET_AUTO_LOG_DIRECTORY` _(optional)_:: + +The directory in which to write log files. If unset, defaults to * `%PROGRAMDATA%\elastic\apm-agent-dotnet\logs` on Windows * `/var/log/elastic/apm-agent-dotnet` on Linux -If the default directory cannot be written to for some reason, the profiler -will try to write log files to a `logs` directory in the home directory specified -by `ELASTIC_APM_PROFILER_HOME` environment variable. [IMPORTANT] -- @@ -82,8 +82,7 @@ A semi-colon separated list of targets for profiler logs. Valid values are * file * stdout -The default value is `file`, which logs to the directory specified by -`ELASTIC_APM_PROFILER_LOG_DIR` environment variable. +The default value is `file` if `OTEL_DOTNET_AUTO_LOG_DIRECTORY` is set or `OTEL_LOG_LEVEL` is set to `trace` or `debug`. [float]