Exemplo n.º 1
0
        static LogRecord()
        {
            GlobalContext.Properties["InstanceName"] = Process.GetCurrentProcess().Id;
            var loggers      = LoggerManager.GetCurrentLoggers(Assembly.GetCallingAssembly());
            var loggerSystem = loggers.SingleOrDefault(f => f.Name.Equals("LoggerNameSystem", StringComparison.OrdinalIgnoreCase));

            if (loggerSystem == null)
            {
                loggerSystem = loggers.FirstOrDefault(t => t.Name.Equals("LoggerNameRecordData", StringComparison.InvariantCultureIgnoreCase) == false);
            }
            logger  = loggerSystem;
            logType = typeof(LogRecord);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Returns all the currently defined loggers in the specified domain.
 /// </summary>
 /// <param name="domain">the domain to lookup in</param>
 /// <remarks>
 /// The root logger is <b>not</b> included in the returned array.
 /// </remarks>
 /// <returns>All the defined loggers</returns>
 public static IExtLog[] GetCurrentLoggers(string domain)
 {
     return(WrapLoggers(LoggerManager.GetCurrentLoggers(domain)));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns all the currently defined loggers in the specified assembly's domain.
 /// </summary>
 /// <param name="assembly">the assembly to use to lookup the domain</param>
 /// <remarks>
 /// The root logger is <b>not</b> included in the returned array.
 /// </remarks>
 /// <returns>All the defined loggers</returns>
 public static IExtLog[] GetCurrentLoggers(Assembly assembly)
 {
     return(WrapLoggers(LoggerManager.GetCurrentLoggers(assembly)));
 }