Add Console Writeline in Log

This commit is contained in:
atef 2023-07-10 10:22:09 +02:00
parent 4ee7aebf95
commit 93d8936430
2 changed files with 4 additions and 2 deletions

View File

@ -42,6 +42,8 @@ public class CustomLogger : ILogger
// Write the log message to the file
File.AppendAllText(_LogFilePath, logMessage + Environment.NewLine);
_CurrentFileSizeBytes += logMessage.Length;
Console.WriteLine( logMessage + Environment.NewLine);
}
private void RotateLogFile()

View File

@ -18,7 +18,7 @@ public class RelaysDevice
}
catch (Exception e)
{
$"Failed to read from {nameof(RelaysDevice)}\n{e}".LogInfo();
$"Failed to read from {nameof(RelaysDevice)}\n{e}".LogError();
// TODO: log
return null;
@ -33,7 +33,7 @@ public class RelaysDevice
}
catch (Exception e)
{
$"Failed to write to {nameof(RelaysDevice)}\n{e}".LogInfo();
$"Failed to write to {nameof(RelaysDevice)}\n{e}".LogError();
}
}
}