/// <summary> /// Writes a critical error system message to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="format">A composite format string.</param> /// <param name="args">An array of objects to write using format.</param> public void Critical(CommonLogType logType, string format, params object[] args) { if (MinLevel >= CommonLogLevel.Critical) { _loggers[logType].Fatal(FormatString(format, args)); } }
/// <summary> /// Writes an Critical error <see cref="Exception"/> to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="ex">The <see cref="Exception"/> to write.</param> public void Critical(CommonLogType logType, Exception ex) { if (MinLevel >= CommonLogLevel.Critical) { _loggers[logType].Fatal(FormatException(ex)); } }
/// <summary> /// Writes a warning message to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="format">A composite format string.</param> /// <param name="args">An array of objects to write using format.</param> public void Warn(CommonLogType logType, string format, params object[] args) { if (MinLevel >= CommonLogLevel.Warning) { _loggers[logType].Warn(FormatString(format, args)); } }
/// <summary> /// Writes an informational message to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="format">A composite format string.</param> /// <param name="args">An array of objects to write using format.</param> public void Info(CommonLogType logType, string format, params object[] args) { if (MinLevel >= CommonLogLevel.Information) { _loggers[logType].Info(FormatString(format, args)); } }
/// <summary> /// Writes an critical <see cref="Exception"/> to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="message">A message string.</param> /// <param name="ex">The <see cref="Exception"/> to write.</param> public void Critical(CommonLogType logType, string message, Exception ex) { Critical(logType, message); Critical(logType, ex); }
/// <summary> /// Writes an error <see cref="Exception"/> to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="message">A message string.</param> /// <param name="ex">The <see cref="Exception"/> to write.</param> public void Error(CommonLogType logType, string message, Exception ex) { Error(logType, message); Error(logType, ex); }
/// <summary> /// Writes an Error <see cref="Exception"/> to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="ex">The <see cref="Exception"/> to write.</param> public void Error(CommonLogType logType, Exception ex) { _loggers[logType].Error(FormatException(ex)); }
/// <summary> /// Writes an error message to the Log /// </summary> /// <param name="logType">Defines log4net logger</param> /// <param name="format">A composite format string.</param> /// <param name="args">An array of objects to write using format.</param> public void Error(CommonLogType logType, string format, params object[] args) { _loggers[logType].Error(FormatString(format, args)); }