Add Console Writeline in Log
This commit is contained in:
parent
4ee7aebf95
commit
93d8936430
|
@ -42,6 +42,8 @@ public class CustomLogger : ILogger
|
||||||
// Write the log message to the file
|
// Write the log message to the file
|
||||||
File.AppendAllText(_LogFilePath, logMessage + Environment.NewLine);
|
File.AppendAllText(_LogFilePath, logMessage + Environment.NewLine);
|
||||||
_CurrentFileSizeBytes += logMessage.Length;
|
_CurrentFileSizeBytes += logMessage.Length;
|
||||||
|
|
||||||
|
Console.WriteLine( logMessage + Environment.NewLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RotateLogFile()
|
private void RotateLogFile()
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class RelaysDevice
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
$"Failed to read from {nameof(RelaysDevice)}\n{e}".LogInfo();
|
$"Failed to read from {nameof(RelaysDevice)}\n{e}".LogError();
|
||||||
|
|
||||||
// TODO: log
|
// TODO: log
|
||||||
return null;
|
return null;
|
||||||
|
@ -33,7 +33,7 @@ public class RelaysDevice
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
$"Failed to write to {nameof(RelaysDevice)}\n{e}".LogInfo();
|
$"Failed to write to {nameof(RelaysDevice)}\n{e}".LogError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue