Skip to content

Commit

Permalink
Change default log message format for xunit logger
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Feb 14, 2024
1 parent 935d17b commit 758d3e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Foundatio.Xunit/Logging/LogEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class LogEntry

public override string ToString()
{
return String.Concat("", Date.ToString("mm:ss.fffff"), " ", LogLevel.ToString().Substring(0, 1).ToUpper(), ":", CategoryName, " - ", Message);
return String.Concat("", Date.ToString("mm:ss.fff"), " ", LogLevel.ToString().Substring(0, 1).ToUpper(), ": ", Message, " - ", CategoryName);
}

public string ToString(bool useFullCategory)
Expand All @@ -33,6 +33,6 @@ public string ToString(bool useFullCategory)
category = category.Substring(lastDot + 1);
}

return String.Concat("", Date.ToString("mm:ss.fffff"), " ", LogLevel.ToString().Substring(0, 1).ToUpper(), ":", category, " - ", Message);
return String.Concat("", Date.ToString("mm:ss.fff"), " ", LogLevel.ToString().Substring(0, 1).ToUpper(), ": ", Message, " - ", category);
}
}

0 comments on commit 758d3e1

Please sign in to comment.