Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
Fix null-reference exception on null Tags list inside LogglyConfigAda…
Browse files Browse the repository at this point in the history
…pter.cs.
  • Loading branch information
InKolev authored and MiguelAlho committed Jul 17, 2018
1 parent 02c9095 commit 52698a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Serilog.Sinks.Loggly/Sinks/Loggly/LogglyConfigAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ public void ConfigureLogglyClient(LogglyConfiguration logglyConfiguration)
config.CustomerToken = logglyConfiguration.CustomerToken;
config.IsEnabled = logglyConfiguration.IsEnabled;

foreach (var tag in logglyConfiguration.Tags)
if (logglyConfiguration.Tags != null)
{
config.TagConfig.Tags.Add(tag);
foreach (var tag in logglyConfiguration.Tags)
{
config.TagConfig.Tags.Add(tag);
}
}

config.ThrowExceptions = logglyConfiguration.ThrowExceptions;
Expand Down

0 comments on commit 52698a8

Please sign in to comment.