Ejemplo n.º 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;
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
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));
 }
Ejemplo n.º 4
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);
 }
Ejemplo n.º 5
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);
 }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 23
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));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 25
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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 27
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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 29
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);
 }
Ejemplo n.º 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);
 }