Skip to content

Commit 9640249

Browse files
committed
Some minor updates to the nlog client extensions.
1 parent 3195661 commit 9640249

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

Source/Platforms/NLog/ExceptionlessClientExtensions.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ public static EventBuilder CreateFromLogEvent(this ExceptionlessClient client, L
1414
contextData.SetException(ev.Exception);
1515

1616
var builder = client.CreateEvent(contextData);
17-
if (ev.Exception == null) {
18-
builder.SetSource(ev.LoggerName);
19-
builder.SetProperty(Event.KnownDataKeys.Level, ev.Level.Name);
20-
}
21-
2217
builder.Target.Date = ev.TimeStamp;
18+
builder.SetSource(ev.LoggerName);
2319

20+
if (ev.Exception == null)
21+
builder.SetProperty(Event.KnownDataKeys.Level, ev.Level.Name);
22+
2423
if (!String.IsNullOrWhiteSpace(ev.FormattedMessage))
2524
builder.SetMessage(ev.FormattedMessage);
26-
27-
if (ev.Exception != null)
28-
builder.SetSource(ev.LoggerName);
29-
25+
3026
var tagList = ev.GetTags();
3127
if (tagList.Count > 0)
3228
builder.AddTags(tagList.ToArray());

Source/Tests/Exceptionless.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<Private>True</Private>
4444
</Reference>
4545
<Reference Include="Foundatio, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
46-
<HintPath>..\..\packages\Foundatio.4.0.672\lib\net45\Foundatio.dll</HintPath>
46+
<HintPath>..\..\packages\Foundatio.4.0.794\lib\net451\Foundatio.dll</HintPath>
4747
<Private>True</Private>
4848
</Reference>
4949
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

Source/Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Exceptionless.RandomData" version="1.0.21.0" targetFramework="net451" />
4-
<package id="Foundatio" version="4.0.672" targetFramework="net451" />
4+
<package id="Foundatio" version="4.0.794" targetFramework="net451" />
55
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
66
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
77
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net451" />

0 commit comments

Comments
 (0)