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); }
public static void Info(this IDHLog log, object sender, object message) { log.Log(sender, message, LogMessageType.Info); }
public static void Debug(this IDHLog log, object sender, object message) { log.Log(sender, message, LogMessageType.Debug); }
public static void Error(this IDHLog log, object sender, object message, Exception exception) { log.Log(sender, message, exception, LogMessageType.Error); }
public static void Error(this IDHLog log, object sender, object message) { Exception exception = message as Exception; log.Log(sender, message, LogMessageType.Error); }
public static void Error(this IDHLog log, Exception exception) { log.Log(string.Empty, exception, LogMessageType.Error); }
public static void Log(this IDHLog log, object message, LogMessageType logMessageType) { log.Log(string.Empty, message, logMessageType); }
public static void Warn(this IDHLog log, object sender, object message) { log.Log(sender, message, LogMessageType.Warning); }