/// <summary> /// Debug 调试信息 /// </summary> /// <param name="message"></param> /// <param name="ex"></param> public static void Debug(object message, Exception ex, string category = null, bool additivity = false) { HandMessage(message, ex); string loggerName = GetLoggerName("Debug", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Debug", category)); logger.Debug(message, ex); }
/// <summary> /// DebugFormat 调试信息 /// </summary> /// <param name="format"></param> /// <param name="args"></param> public static void DebugFormat(string format, string category = null, bool additivity = false, params object[] args) { HandMessage(format, args); string loggerName = GetLoggerName("Debug", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Debug", category)); logger.DebugFormat(format, args); }
/// <summary> /// Error 一般错误 /// </summary> /// <param name="message"></param> /// <param name="category"></param> /// <param name="additivity"></param> public static void Error(object message, string category = null, bool additivity = false) { HandMessage(message); string loggerName = GetLoggerName("Error", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Error", category)); logger.Error(message); }
/// <summary> /// Info 一般信息 /// </summary> /// <param name="message"></param> /// <param name="ex"></param> /// <param name="category"></param> /// <param name="additivity"></param> public static void Info(object message, Exception ex, string category = null, bool additivity = false) { string loggerName = GetLoggerName("Info", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Info", category)); if (logger.IsInfoEnabled) { logger.Info(message, ex); } }
/// <summary> /// WarnFormat 警告 /// </summary> /// <param name="format"></param> /// <param name="category"></param> /// <param name="additivity"></param> /// <param name="args"></param> public static void WarnFormat(string format, string category = null, bool additivity = false, params object[] args) { HandMessage(format, args); string loggerName = GetLoggerName("Warn", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Warn", category)); if (logger.IsWarnEnabled) { logger.WarnFormat(format, args); } }
/// <summary> /// Warn 警告 /// </summary> /// <param name="message"></param> /// <param name="ex"></param> /// <param name="category"></param> /// <param name="additivity"></param> public static void Warn(object message, Exception ex, string category = null, bool additivity = false) { HandMessage(message, ex); string loggerName = GetLoggerName("Warn", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Warn", category)); if (logger.IsWarnEnabled) { logger.Warn(message, ex); } }
/// <summary> /// Fatal 致命错误 /// </summary> /// <param name="message"></param> /// <param name="category"></param> /// <param name="additivity"></param> public static void Fatal(object message, string category = null, bool additivity = false) { HandMessage(message); string loggerName = GetLoggerName("Fatal", category); ILog logger = CustomRollingFileLogger.GetCustomLogger(loggerName, GetCategory("Fatal", category)); if (logger.IsFatalEnabled) { logger.Fatal(message); } }