From 2f48af7a577c23ce3d6f60e75aaf6d8044691679 Mon Sep 17 00:00:00 2001 From: cgourlay Date: Mon, 18 Jul 2016 19:16:37 +0000 Subject: [PATCH] Correct assignment of the environment vars --- .../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; }