From 2ba86ca5487b07dd31c7fc59ef366c598e67e8d1 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 22 Nov 2016 16:00:25 -0500 Subject: [PATCH] Update EnvironmentUserNameEnricher.cs --- .../Enrichers/EnvironmentUserNameEnricher.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }