Example #1
0
        public static void Log(this IDHLog log, object sender, object message, Exception exception, LogMessageType logMessageType)
        {
            Type logType = null;

            if (sender != null)
            {
                if (sender is string)
                {
                    log.Log(sender as string, message, exception, logMessageType);
                    return;
                }

                logType = sender as Type ?? sender.GetType();
            }

            log.Log(logType, message, exception, logMessageType);
        }
Example #2
0
 public static void Info(this IDHLog log, object sender, object message)
 {
     log.Log(sender, message, LogMessageType.Info);
 }
Example #3
0
 public static void Debug(this IDHLog log, object sender, object message)
 {
     log.Log(sender, message, LogMessageType.Debug);
 }
Example #4
0
 public static void Error(this IDHLog log, object sender, object message, Exception exception)
 {
     log.Log(sender, message, exception, LogMessageType.Error);
 }
Example #5
0
        public static void Error(this IDHLog log, object sender, object message)
        {
            Exception exception = message as Exception;

            log.Log(sender, message, LogMessageType.Error);
        }
Example #6
0
 public static void Error(this IDHLog log, Exception exception)
 {
     log.Log(string.Empty, exception, LogMessageType.Error);
 }
Example #7
0
 public static void Log(this IDHLog log, object message, LogMessageType logMessageType)
 {
     log.Log(string.Empty, message, logMessageType);
 }
Example #8
0
 public static void Warn(this IDHLog log, object sender, object message)
 {
     log.Log(sender, message, LogMessageType.Warning);
 }