Skip to content

Commit

Permalink
Added Exception message output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaben Cargman committed Feb 17, 2017
1 parent c4e63b5 commit 33332c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Papercut.UI/Resources/LogClientSink.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,28 @@
color: #e5e5e5;
line-height: 1.5;
}

.logEntry {
padding-top: 5px;
border-bottom: 1px #353535 solid;
}
.bold {
font-weight: bold;
}
.fatal {
color: #f00;
}

.warning {
color: #ecec00;
}

.information {
color: #0087f3;
}

.error {
color: #ca3333;
}

.debug {
color: #aaa;
}

.date {
color: #777;
}
Expand Down
4 changes: 4 additions & 0 deletions src/Papercut.UI/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ public IEnumerable<string> RenderLogEventParts(LogEvent e)
yield return $@"<span class=""date"">{e.Timestamp:G}</span>";
yield return $@"[<span class=""errorLevel"">{e.Level}</span>]";
yield return e.RenderMessage();
if (e.Exception != null)
{
yield return $@"<span class=""fatal"">Exception: {e.Exception.Message}</span>";
}
yield return @"</div>";
}

Expand Down

0 comments on commit 33332c5

Please sign in to comment.