Skip to content

Commit

Permalink
Fix configuration for exception logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikgolda committed Apr 23, 2019
1 parent a0a957d commit 4ec61eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Soloplan.WhatsON.GUI/Logging/LogConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
xsi:type="File"
fileName="${var:logFileDir}/whatsON.log"
archiveFileName="${var:logFileDir}/archives/{#####}.zip"
layout="${longdate} ${level} ${callsite}:${callsite-linenumber} - ${message}"
layout="${longdate} ${level} ${callsite}:${callsite-linenumber} - ${message}
${exception:format=Type, Message,ToString,StackTrace:maxInnerExceptionLevel=10:separator=\r\n}"
keepFileOpen="false"
archiveAboveSize="20971520"
enableArchiveFileCompression="true"
Expand Down
2 changes: 1 addition & 1 deletion src/Soloplan.WhatsON/ObservationScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private async Task StartObserveSingle(ObservationSubject subject, CancellationTo
}
catch (Exception e)
{
log.Error("Exception occurred when observing subject {subject}, exception {e}", new { Interval = subject.Interval, Name = subject.Subject.SubjectConfiguration.Name, CurrentStatus = subject.Subject.CurrentStatus }, e);
log.Error(e, "Exception occurred when observing subject {subject}", new { Interval = subject.Interval, Name = subject.Subject.SubjectConfiguration.Name, CurrentStatus = subject.Subject.CurrentStatus });
}
}

Expand Down

0 comments on commit 4ec61eb

Please sign in to comment.