diff --git a/src/Promitor.Core.Telemetry/Loggers/Logger.cs b/src/Promitor.Core.Telemetry/Loggers/Logger.cs index 33a4addaf..bca8a7777 100644 --- a/src/Promitor.Core.Telemetry/Loggers/Logger.cs +++ b/src/Promitor.Core.Telemetry/Loggers/Logger.cs @@ -12,6 +12,12 @@ public Logger(string name) : base(name, (loggerName, logLevel) => IsFilteringReq { } + public override void WriteMessage(LogLevel logLevel, string logName, int eventId, string message, Exception exception) + { + message = $"[{DateTimeOffset.UtcNow.ToString("u")}] {message}"; + base.WriteMessage(logLevel, logName, eventId, message, exception); + } + private static bool IsFilteringRequired(LogLevel usedLogLevel) { var rawMinimalLogLevel = Environment.GetEnvironmentVariable(EnvironmentVariables.Logging.MinimumLogLevel);