Ejemplo n.º 1
0
 /// <summary>
 /// Get A logger if it exists
 /// </summary>
 /// <param name="containerName"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 public static ILog Exists(string containerName, string name)
 {
     if (containerName == null)
     {
         throw new ArgumentNullException("containerName");
     }
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     return(WrapLogger(LoggerDirector.Exists(containerName, name)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a logger container based on name an type.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public static ILoggerContainer CreateContainer(string name, Type type)
 {
     return(LoggerDirector.CreateContainer(name, type));
 }
Ejemplo n.º 3
0
 public static List <ILog> GetCurrentLoggers(string containerName)
 {
     return(WrapLoggers(LoggerDirector.GetCurrentLoggers(containerName)));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Current loggers
 /// </summary>
 /// <param name="assembly"></param>
 /// <returns></returns>
 public static List <ILog> GetCurrentLoggers(Assembly assembly)
 {
     return(WrapLoggers(LoggerDirector.GetCurrentLoggers(assembly.GetName().Name)));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Get logger from type.
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static ILog GetLogger(Type type)
 {
     return(WrapLogger(LoggerDirector.GetLogger(Assembly.GetCallingAssembly(), type.FullName)));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Get logger from name and type.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public static ILog GetLogger(string name, Type type)
 {
     return(WrapLogger(LoggerDirector.GetLogger(name, type.FullName)));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Get logger from assembly and name.
 /// </summary>
 /// <param name="assembly"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 public static ILog GetLogger(Assembly assembly, string name)
 {
     return(WrapLogger(LoggerDirector.GetLogger(assembly, name)));
 }