Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogMessage" /> class.
 /// </summary>
 /// <param name="module">The module.</param>
 /// <param name="type">The type.</param>
 /// <param name="text">The text.</param>
 /// <param name="exception">The exception.</param>
 /// <param name="callerInfo">The caller info.</param>
 public LogMessage(string module, LogMessageType type, string text, Exception exception, CallerInfo callerInfo)
 {
     Module = module;
     Type = type;
     Text = text;
     Exception = exception;
     CallerInfo = callerInfo;
 }
 /// <summary>
 /// Logs the specified fatal message.
 /// </summary>
 /// <param name="message">The fatal message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Fatal(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Fatal(log, message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified debug message with an exception.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Debug(string message, Exception exception, CallerInfo callerInfo = null)
 {
     Log(new LogMessage(Module, LogMessageType.Debug, message, exception, callerInfo));
 }
 /// <summary>
 /// Logs the specified verbose message.
 /// </summary>
 /// <param name="message">The verbose message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Verbose(string message, CallerInfo callerInfo = null)
 {
     Verbose(message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified warning message.
 /// </summary>
 /// <param name="message">The warning message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Warning(string message, CallerInfo callerInfo = null)
 {
     Warning(message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified info message.
 /// </summary>
 /// <param name="message">The info message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Info(string message, CallerInfo callerInfo = null)
 {
     Info(message, null, callerInfo);
 }
Example #7
0
 /// <summary>
 /// Logs the specified info message.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="message">The info message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Info([NotNull] this ILogger logger, string message, CallerInfo callerInfo = null)
 {
     Info(logger, message, null, callerInfo);
 }
Example #8
0
 /// <summary>
 /// Logs the specified verbose message with an exception.
 /// </summary>
 /// <param name="message">The verbose message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Verbose(string message, Exception exception, CallerInfo callerInfo = null)
 {
     Log(new LogMessage(Module, LogMessageType.Verbose, message, exception, callerInfo));
 }
Example #9
0
 /// <summary>
 /// Logs the specified error message.
 /// </summary>
 /// <param name="message">The error message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Error(string message, CallerInfo callerInfo = null)
 {
     Error(message, null, callerInfo);
 }
Example #10
0
 /// <summary>
 /// Logs the specified info message.
 /// </summary>
 /// <param name="message">The info message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Info(string message, CallerInfo callerInfo = null)
 {
     Info(message, null, callerInfo);
 }
Example #11
0
 /// <summary>
 /// Logs the specified warning message.
 /// </summary>
 /// <param name="message">The warning message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Warning(string message, CallerInfo callerInfo = null)
 {
     Warning(message, null, callerInfo);
 }
Example #12
0
 /// <summary>
 /// Logs the specified debug message.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Debug(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Debug(log, message, null, callerInfo);
 }
Example #13
0
 /// <summary>
 /// Logs the specified debug message with an exception.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Debug(this ILogger log, string message, Exception exception, CallerInfo callerInfo = null)
 {
     log.Log(new LogMessage(log.Module, LogMessageType.Debug, message, exception, callerInfo));
 }
Example #14
0
 /// <summary>
 /// Logs the specified verbose message.
 /// </summary>
 /// <param name="message">The verbose message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Verbose(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Verbose(log, message, null, callerInfo);
 }
Example #15
0
 /// <summary>
 /// Logs the specified debug message with an exception.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Debug(this ILogger log, string message, Exception exception, CallerInfo callerInfo = null)
 {
     log.Log(new LogMessage(log.Module, LogMessageType.Debug, message, exception, callerInfo));
 }
Example #16
0
 /// <summary>
 /// Logs the specified fatal message.
 /// </summary>
 /// <param name="message">The fatal message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Fatal(string message, CallerInfo callerInfo = null)
 {
     Fatal(message, null, callerInfo);
 }
Example #17
0
 /// <summary>
 /// Logs the specified debug message.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Debug(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Debug(log, message, null, callerInfo);
 }
Example #18
0
 /// <summary>
 /// Logs the specified verbose message.
 /// </summary>
 /// <param name="message">The verbose message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Verbose(string message, CallerInfo callerInfo = null)
 {
     Verbose(message, null, callerInfo);
 }
Example #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogMessage" /> class.
 /// </summary>
 /// <param name="module">The module.</param>
 /// <param name="type">The type.</param>
 /// <param name="text">The text.</param>
 /// <param name="exception">The exception.</param>
 /// <param name="callerInfo">The caller info.</param>
 public LogMessage(string module, LogMessageType type, string text, Exception exception, CallerInfo callerInfo)
 {
     Module     = module;
     Type       = type;
     Text       = text;
     Exception  = exception;
     CallerInfo = callerInfo;
 }
Example #20
0
 /// <summary>
 /// Logs the specified debug message with an exception.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Debug(string message, Exception exception, CallerInfo callerInfo = null)
 {
     Log(new LogMessage(Module, LogMessageType.Debug, message, exception, callerInfo));
 }
Example #21
0
 /// <summary>
 /// Logs the specified warning message with an exception.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="message">The warning message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Warning([NotNull] this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
 {
     logger.Log(new LogMessage(logger.Module, LogMessageType.Warning, message, exception, callerInfo));
 }
Example #22
0
 /// <summary>
 /// Logs the specified debug message.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Debug(string message, CallerInfo callerInfo = null)
 {
     Debug(message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified verbose message with an exception.
 /// </summary>
 /// <param name="message">The verbose message.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Verbose(string message, Exception exception, CallerInfo callerInfo = null)
 {
     Log(new LogMessage(Module, LogMessageType.Verbose, message, exception, callerInfo));
 }
Example #24
0
 /// <summary>
 /// Logs the specified error message.
 /// </summary>
 /// <param name="message">The error message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Error(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Error(log, message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified error message.
 /// </summary>
 /// <param name="message">The error message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Error(string message, CallerInfo callerInfo = null)
 {
     Error(message, null, callerInfo);
 }
Example #26
0
 /// <summary>
 /// Logs the specified fatal message.
 /// </summary>
 /// <param name="message">The fatal message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Fatal(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Fatal(log, message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified fatal message.
 /// </summary>
 /// <param name="message">The fatal message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Fatal(string message, CallerInfo callerInfo = null)
 {
     Fatal(message, null, callerInfo);
 }
Example #28
0
 /// <summary>
 /// Logs the specified verbose message.
 /// </summary>
 /// <param name="message">The verbose message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Verbose(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Verbose(log, message, null, callerInfo);
 }
 /// <summary>
 /// Logs the specified debug message.
 /// </summary>
 /// <param name="message">The debug message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public void Debug(string message, CallerInfo callerInfo = null)
 {
     Debug(message, null, callerInfo);
 }
Example #30
0
 /// <summary>
 /// Logs the specified error message.
 /// </summary>
 /// <param name="message">The error message.</param>
 /// <param name="callerInfo">Information about the caller. Default is null, otherwise use <see cref="CallerInfo.Get"/>.</param>
 public static void Error(this ILogger log, string message, CallerInfo callerInfo = null)
 {
     Error(log, message, null, callerInfo);
 }