diff --git a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs index 324adff..09ec040 100644 --- a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs +++ b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs @@ -49,8 +49,8 @@ private static string GetEnvironmentUserName() var userDomainName = Environment.UserDomainName; var userName = Environment.UserName; #else - var userDomainName = Environment.GetEnvironmentVariable("USERNAME"); - var userName = Environment.GetEnvironmentVariable("USERDOMAIN"); + var userDomainName = Environment.GetEnvironmentVariable("USERDOMAIN"); + var userName = Environment.GetEnvironmentVariable("USERNAME"); #endif return !string.IsNullOrWhiteSpace(userDomainName) ? $@"{userDomainName}\{userName}" : userName; }