Exemple #1
0
 /// <summary>
 /// Helper methods to log a Information with
 /// the stack trace of the <see cref="Exception"/> passed
 /// as a parameter.
 /// </summary>
 /// <param name="exception">The exception to log, including its stack trace.</param>
 public static void Information(Exception exception)
 {
     log = Library.Logging.LogManager.GetLogger(String.Empty);
     if (log.IsInfoEnabled)
     {
         log.Info(exception.Message, exception);
     }
 }
Exemple #2
0
 /// <summary>
 /// Helper methods to log a Information message
 /// </summary>
 /// <param name="message">The message string to log.</param>
 public static void Information(string message)
 {
     log = Library.Logging.LogManager.GetLogger(String.Empty);
     if (log.IsInfoEnabled)
     {
         log.Info(message);
     }
 }
Exemple #3
0
 /// <summary>
 /// Helper methods to log a Information message including
 /// the stack trace of the <see cref="Exception"/> passed
 /// as a parameter.
 /// </summary>
 /// <param name="type">The object <paramref name="type"/> will be used for the logger. Ex. System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, typeOf(Classname) or this.GetType();</param>
 /// <param name="exception">The exception to log, including its stack trace.</param>
 /// <param name="message">The message string to log.</param>
 public static void Information(string type, Exception exception, string message)
 {
     log = Library.Logging.LogManager.GetLogger(type);
     if (log.IsInfoEnabled)
     {
         log.Info(message, exception);
     }
 }
Exemple #4
0
 /// <summary>
 /// Helper methods to log a Information with
 /// the stack trace of the <see cref="Exception"/> passed
 /// as a parameter.
 /// </summary>
 /// <param name="type">The object <paramref name="type"/> will be used for the logger. Ex. typeOf(Classname) or this.GetType();</param>
 /// <param name="exception">The exception to log, including its stack trace.</param>
 public static void Information(Type type, Exception exception)
 {
     log = Library.Logging.LogManager.GetLogger(type);
     if (log.IsInfoEnabled)
     {
         log.Info(exception.Message, exception);
     }
 }
Exemple #5
0
 /// <summary>
 /// Helper methods to log a Information message
 /// </summary>
 /// <param name="type">The object <paramref name="type"/> will be used for the logger. Ex. typeOf(Classname) or this.GetType();</param>
 /// <param name="message">The message string to log.</param>
 public static void Information(Type type, string message)
 {
     log = Library.Logging.LogManager.GetLogger(type);
     if (log.IsInfoEnabled)
     {
         log.Info(message);
     }
 }