Ejemplo n.º 1
0
 public CapturingLoggerEvent(CapturingLogger source, LogLevelType level, object msg, Exception ex)
 {
     Source        = source;
     Level         = level;
     MessageObject = msg;
     Exception     = ex;
 }
Ejemplo n.º 2
0
        public ILogger GetLogger(string name)
        {
            ILogger logger;

            if (!cachedLoggers.TryGetValue(name, out logger))
            {
                lock (((ICollection)cachedLoggers).SyncRoot)
                {
                    if (!cachedLoggers.TryGetValue(name, out logger))
                    {
                        logger = new CapturingLogger(this, name);
                        cachedLoggers[name] = logger;
                    }
                }
            }
            return(logger);
        }