Skip to content

Instantly share code, notes, and snippets.

Created January 27, 2012 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/50f9b869b48c1478e858 to your computer and use it in GitHub Desktop.
Save anonymous/50f9b869b48c1478e858 to your computer and use it in GitHub Desktop.
private Tuple<XAttribute[], IEnumerable<object>> ShowLogEntry(LogEntry entry)
{
return new Tuple<XAttribute[], IEnumerable<object>>(
new[]
{
Html.CreateClassAttribute(string.Format("record-{0}", entry.Level.ToString().ToLower())),
new XAttribute("entry-partitionkey", entry.PartitionKey),
new XAttribute("entry-rowkey", entry.RowKey),
},
new object[]
{
new[]
{
new XAttribute("class", "log-level-icon"),
ShowLevelIcon(entry.Level),
},
Html.XMultiline(
s_knownLevels.Contains(entry.Level) ? null : entry.Level.ToString(),
ShowDate(entry.Timestamp),
entry.Role,
string.Format("Instance {0}", entry.ShortInstance)),
Html.XCreateDiv(new XAttribute("class", "plaintext"), entry.Message),
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment