Skip to content

Commit

Permalink
remove empty line in logger
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Jul 21, 2024
1 parent df8cbce commit 25fd0c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OneWare.Core/Services/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void Log(object message, ConsoleColor color = default, bool writeOutput =
public void Error(string message, Exception? exception = null, bool showOutput = true,
bool showDialog = false, Window? dialogOwner = null)
{
Log(message + "\n" + exception, ConsoleColor.Red);
Log(message + (exception != null ? $"\n{exception}" : ""), ConsoleColor.Red);

if (showOutput && ContainerLocator.Container.IsRegistered<IOutputService>())
Dispatcher.UIThread.Post(() =>
Expand All @@ -80,7 +80,7 @@ public void Error(string message, Exception? exception = null, bool showOutput =
public void Warning(string message, Exception? exception = null, bool showOutput = true,
bool showDialog = false, Window? dialogOwner = null)
{
Log(message + "\n" + exception, ConsoleColor.Yellow);
Log(message + (exception != null ? $"\n{exception}" : ""), ConsoleColor.Yellow);

if (showOutput && ContainerLocator.Container.IsRegistered<IOutputService>())
{
Expand Down

0 comments on commit 25fd0c5

Please sign in to comment.