Example #1
0
 public static void ErrorFormat(this ITcLog logger, string message, params object[] args)
 {
     if (logger.IsErrorEnabled())
     {
         logger.LogFormat(TcLogLevel.Error, message, args);
     }
 }
Example #2
0
 public static void Warn(this ITcLog logger, string message)
 {
     if (logger.IsWarnEnabled())
     {
         logger.Log(TcLogLevel.Warn, message.AsFunc());
     }
 }
Example #3
0
 public static void Error(this ITcLog logger, string message)
 {
     if (logger.IsErrorEnabled())
     {
         logger.Log(TcLogLevel.Error, message.AsFunc());
     }
 }
Example #4
0
 public static void Fatal(this ITcLog logger, string message)
 {
     if (logger.IsFatalEnabled())
     {
         logger.Log(TcLogLevel.Fatal, message.AsFunc());
     }
 }
Example #5
0
 public static void DebugException(this ITcLog logger, string message, Exception exception, params object[] formatParams)
 {
     if (logger.IsDebugEnabled())
     {
         logger.Log(TcLogLevel.Debug, message.AsFunc(), exception, formatParams);
     }
 }
Example #6
0
 public static void WarnFormat(this ITcLog logger, string message, params object[] args)
 {
     if (logger.IsWarnEnabled())
     {
         logger.LogFormat(TcLogLevel.Warn, message, args);
     }
 }
Example #7
0
 // ReSharper disable once UnusedParameter.Local
 private static void GuardAgainstNullLogger(ITcLog logger)
 {
     if (logger == null)
     {
         throw new ArgumentNullException(nameof(logger));
     }
 }
Example #8
0
 public static void Debug(this ITcLog logger, string message)
 {
     if (logger.IsDebugEnabled())
     {
         logger.Log(TcLogLevel.Debug, message.AsFunc());
     }
 }
Example #9
0
 public static void DebugException(this ITcLog logger, string message, Exception exception)
 {
     if (logger.IsDebugEnabled())
     {
         logger.Log(TcLogLevel.Debug, message.AsFunc(), exception);
     }
 }
Example #10
0
 public static void FatalFormat(this ITcLog logger, string message, params object[] args)
 {
     if (logger.IsFatalEnabled())
     {
         logger.LogFormat(TcLogLevel.Fatal, message, args);
     }
 }
Example #11
0
 public static void TraceFormat(this ITcLog logger, string message, params object[] args)
 {
     if (logger.IsTraceEnabled())
     {
         logger.LogFormat(TcLogLevel.Trace, message, args);
     }
 }
Example #12
0
 public static void Trace(this ITcLog logger, string message)
 {
     if (logger.IsTraceEnabled())
     {
         logger.Log(TcLogLevel.Trace, message.AsFunc());
     }
 }
Example #13
0
 public static void InfoFormat(this ITcLog logger, string message, params object[] args)
 {
     if (logger.IsInfoEnabled())
     {
         logger.LogFormat(TcLogLevel.Info, message, args);
     }
 }
Example #14
0
 public static void Info(this ITcLog logger, string message)
 {
     if (logger.IsInfoEnabled())
     {
         logger.Log(TcLogLevel.Info, message.AsFunc());
     }
 }
Example #15
0
 public static void DebugFormat(this ITcLog logger, string message, params object[] args)
 {
     if (logger.IsDebugEnabled())
     {
         logger.LogFormat(TcLogLevel.Debug, message, args);
     }
 }
Example #16
0
 public static bool IsTraceEnabled(this ITcLog logger)
 {
     GuardAgainstNullLogger(logger);
     return(logger.IsLogLevelEnabled(TcLogLevel.Trace));
 }
Example #17
0
 private static void LogFormat(this ITcLog logger, TcLogLevel logLevel, string message, params object[] args)
 {
     logger.Log(logLevel, message.AsFunc(), null, args);
 }
Example #18
0
 public static void Debug(this ITcLog logger, Exception exception, string message, params object[] args)
 {
     logger.DebugException(message, exception, args);
 }
Example #19
0
 public static void Trace(this ITcLog logger, string message, params object[] args)
 {
     logger.TraceFormat(message, args);
 }
Example #20
0
 public static void Info(this ITcLog logger, string message, params object[] args)
 {
     logger.InfoFormat(message, args);
 }
Example #21
0
 public static void Debug(this ITcLog logger, string message, params object[] args)
 {
     logger.DebugFormat(message, args);
 }
Example #22
0
 public static bool IsDebugEnabled(this ITcLog logger)
 {
     GuardAgainstNullLogger(logger);
     return(logger.IsLogLevelEnabled(TcLogLevel.Debug));
 }
Example #23
0
 public static void Error(this ITcLog logger, string message, params object[] args)
 {
     logger.ErrorFormat(message, args);
 }
Example #24
0
 public static void Error(this ITcLog logger, Func <string> messageFunc)
 {
     GuardAgainstNullLogger(logger);
     logger.Log(TcLogLevel.Error, messageFunc);
 }
Example #25
0
 public static void Fatal(this ITcLog logger, Func <string> messageFunc)
 {
     logger.Log(TcLogLevel.Fatal, messageFunc);
 }
Example #26
0
 public static void Warn(this ITcLog logger, string message, params object[] args)
 {
     logger.WarnFormat(message, args);
 }
Example #27
0
 public static void Fatal(this ITcLog logger, string message, params object[] args)
 {
     logger.FatalFormat(message, args);
 }
Example #28
0
 protected ApplicationBase(ITcLogProvider logProvider)
 {
     Logger = logProvider.GetLogFor(typeof(ApplicationBase));
 }
Example #29
0
 public static bool IsErrorEnabled(this ITcLog logger)
 {
     GuardAgainstNullLogger(logger);
     return(logger.IsLogLevelEnabled(TcLogLevel.Error));
 }