Esempio n. 1
0
 public CapturingLoggerEvent(CapturingLogger source, LogLevelType level, object msg, Exception ex)
 {
     Source        = source;
     Level         = level;
     MessageObject = msg;
     Exception     = ex;
 }
Esempio 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);
        }