diff --git a/src/Elastic.OpenTelemetry.Core/Configuration/CompositeElasticOpenTelemetryOptions.cs b/src/Elastic.OpenTelemetry.Core/Configuration/CompositeElasticOpenTelemetryOptions.cs index 93ca1f85..55e805da 100644 --- a/src/Elastic.OpenTelemetry.Core/Configuration/CompositeElasticOpenTelemetryOptions.cs +++ b/src/Elastic.OpenTelemetry.Core/Configuration/CompositeElasticOpenTelemetryOptions.cs @@ -180,9 +180,11 @@ internal bool GlobalLogEnabled private static string GetDefaultLogDirectory() { - var applicationMoniker = "elastic-otel-dotnet"; + const string applicationMoniker = "elastic-otel-dotnet"; + if (IsOSPlatform(OSPlatform.Windows)) return Path.Combine(GetFolderPath(SpecialFolder.ApplicationData), "elastic", applicationMoniker); + if (IsOSPlatform(OSPlatform.OSX)) return Path.Combine(GetFolderPath(SpecialFolder.LocalApplicationData), "elastic", applicationMoniker); @@ -192,9 +194,9 @@ private static string GetDefaultLogDirectory() /// /// The default log directory if file logging was enabled but non was specified /// Defaults to: - /// - %PROGRAMDATA%\elastic\apm-agent-dotnet (on Windows) - /// - /var/log/elastic/apm-agent-dotnet (on Linux) - /// - ~/Library/Application_Support/elastic/apm-agent-dotnet (on OSX) + /// - %USERPROFILE%\AppData\Roaming\elastic\elastic-otel-dotnet (on Windows) + /// - /var/log/elastic/elastic-otel-dotnet (on Linux) + /// - ~/Library/Application Support/elastic/elastic-otel-dotnet (on OSX) /// internal string LogDirectoryDefault { get; } diff --git a/src/Elastic.OpenTelemetry.Core/Diagnostics/LoggerMessages.cs b/src/Elastic.OpenTelemetry.Core/Diagnostics/LoggerMessages.cs index a1cc4480..6f2b0ab4 100644 --- a/src/Elastic.OpenTelemetry.Core/Diagnostics/LoggerMessages.cs +++ b/src/Elastic.OpenTelemetry.Core/Diagnostics/LoggerMessages.cs @@ -154,7 +154,7 @@ public static void LogDistroPreamble(this ILogger logger, SdkActivationMethod ac logger.LogInformation("EDOT log file: "); } - logger.LogInformation("Activation method: {ActivationMethod}", activationMethod.ToString()); + logger.LogDebug("Activation method: {ActivationMethod}", activationMethod.ToString()); #if NET8_0 logger.LogDebug("Matched TFM: {TargetFrameworkMoniker}", "net8.0");