Пример #1
0
 /// <summary>
 /// Lookup the wrapper objects for the loggers specified
 /// </summary>
 /// <param name="loggers">the loggers to get the wrappers for</param>
 /// <returns>Lookup the wrapper objects for the loggers specified</returns>
 private static IProgramLog[] WrapLoggers(ILogger[] loggers)
 {
     IProgramLog[] array = new IProgramLog[loggers.Length];
     for (int i = 0; i < loggers.Length; i++)
     {
         array[i] = ProgramLogManager.WrapLogger(loggers[i]);
     }
     return(array);
 }
Пример #2
0
 /// <summary>
 /// Returns the named logger if it exists
 /// </summary>
 /// <remarks>
 /// <para>If the named logger exists (in the specified assembly's domain) then it
 /// returns a reference to the logger, otherwise it returns
 /// <c>null</c>.</para>
 /// </remarks>
 /// <param name="assembly">the assembly to use to lookup the domain</param>
 /// <param name="name">The fully qualified logger name to look for</param>
 /// <returns>The logger found, or null</returns>
 public static IProgramLog Exists(Assembly assembly, string name)
 {
     return(ProgramLogManager.WrapLogger(LoggerManager.Exists(assembly, name)));
 }
Пример #3
0
 /// <summary>
 /// Returns the named logger if it exists
 /// </summary>
 /// <remarks>
 /// <para>If the named logger exists (in the specified domain) then it
 /// returns a reference to the logger, otherwise it returns
 /// <c>null</c>.</para>
 /// </remarks>
 /// <param name="domain">the domain to lookup in</param>
 /// <param name="name">The fully qualified logger name to look for</param>
 /// <returns>The logger found, or null</returns>
 public static IProgramLog Exists(string domain, string name)
 {
     return(ProgramLogManager.WrapLogger(LoggerManager.Exists(domain, name)));
 }
Пример #4
0
 /// <summary>
 /// Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)" />.
 /// </summary>
 /// <remarks>
 /// Get the logger for the fully qualified name of the type specified.
 /// </remarks>
 /// <param name="assembly">the assembly to use to lookup the domain</param>
 /// <param name="type">The full name of <paramref name="type" /> will
 /// be used as the name of the logger to retrieve.</param>
 /// <returns>the logger with the name specified</returns>
 public static IProgramLog GetLogger(Assembly assembly, Type type)
 {
     return(ProgramLogManager.WrapLogger(LoggerManager.GetLogger(assembly, type)));
 }
Пример #5
0
 /// <summary>
 /// Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)" />.
 /// </summary>
 /// <remarks>
 /// Get the logger for the fully qualified name of the type specified.
 /// </remarks>
 /// <param name="domain">the domain to lookup in</param>
 /// <param name="type">The full name of <paramref name="type" /> will
 /// be used as the name of the logger to retrieve.</param>
 /// <returns>the logger with the name specified</returns>
 public static IProgramLog GetLogger(string domain, Type type)
 {
     return(ProgramLogManager.WrapLogger(LoggerManager.GetLogger(domain, type)));
 }