Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr committed Oct 12, 2023
1 parent 1331124 commit 040f767
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Agent/NewRelic/Agent/Core/Logging/LoggerBootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ private static LoggerConfiguration ConfigureInMemoryLogSink(this LoggerConfigura
private static LoggerConfiguration ConfigureEventLogSink(this LoggerConfiguration loggerConfiguration)
{
#if NETSTANDARD2_0
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // event log is a Windows-only construct
{
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#else
var isWindows = true;
#endif
if (isWindows)
{
const string eventLogName = "Application";
const string eventLogSourceName = "New Relic .NET Agent";
try
Expand All @@ -147,9 +150,7 @@ private static LoggerConfiguration ConfigureEventLogSink(this LoggerConfiguratio
{
// ignored -- there's nothing we can do at this point, as EventLog is our "fallback" logger and if it fails, we're out of luck
}
#if NETSTANDARD2_0
}
#endif
return loggerConfiguration;
}

Expand Down

0 comments on commit 040f767

Please sign in to comment.