public void Debug(string message, params object[] formatting) { _logger.Debug(message, formatting); var logMessage = new Common.Models.LogMessage { Context = _context, LogLevel = LogLevel.Debug, Message = string.Format(message, formatting) }; _interceptor?.Invoke(logMessage); }
public void Debug(Func <string> message) { _logger.Debug(message()); var logMessage = new Common.Models.LogMessage { Context = _context, LogLevel = LogLevel.Debug, Message = message() }; _interceptor?.Invoke(logMessage); }
public void Warn(string message, params object[] formatting) { _logger.Warning(message, formatting); var logMessage = new Common.Models.LogMessage { Context = _context, LogLevel = LogLevel.Warn, Message = string.Format(message, formatting) }; _interceptor?.Invoke(logMessage); _progressService.WriteMessage(logMessage.Message, PowerShellLineType.Warning); }
public void Info(Func <string> message) { _logger.Information(message()); var logMessage = new Common.Models.LogMessage { Context = _context, LogLevel = LogLevel.Info, Message = message() }; _interceptor?.Invoke(logMessage); _progressService.WriteMessage(logMessage.Message, PowerShellLineType.Output); }
public void Fatal(Func <string> message) { _logger.Fatal(message()); var logMessage = new Common.Models.LogMessage { Context = _context, LogLevel = LogLevel.Fatal, Message = message() }; _interceptor?.Invoke(logMessage); _progressService.WriteMessage(logMessage.Message, PowerShellLineType.Error); }