Broadcast in headless mode.

This commit is contained in:
flash 2019-02-11 16:29:50 +01:00
parent 8709357851
commit 36644423f5

View file

@ -213,9 +213,8 @@ namespace BackupManager
public static void Log(object line, bool forceSatori = false) public static void Log(object line, bool forceSatori = false)
{ {
if (Headless) if (!Headless)
return; {
if (sw?.IsRunning == true) if (sw?.IsRunning == true)
{ {
ConsoleColor fg = Console.ForegroundColor; ConsoleColor fg = Console.ForegroundColor;
@ -225,8 +224,9 @@ namespace BackupManager
} }
Console.WriteLine(line); Console.WriteLine(line);
}
if (forceSatori || !(Config?.SatoriErrorsOnly ?? true)) if (forceSatori || (!Headless && !(Config?.SatoriErrorsOnly ?? true)))
SatoriBroadcast(line.ToString()); SatoriBroadcast(line.ToString());
} }