Inheritance: LoggerBase, ILogger
Exemplo n.º 1
0
		// ----------------------------------------------------------------------
		public override ILogger GetLogger( string name )
		{
			ILogger logger = (ILogger)loggers[ name ];
			if ( logger == null )
			{
				lock ( this )
				{
					logger = (ILogger)loggers[ name ];
					if ( logger == null )
					{
						ILogger newLogger = new LoggerTrace( name );
						loggers.Add( name, newLogger );
						logger = newLogger;
					}
				}
			}
			return logger;
		} // GetLogger
        // ----------------------------------------------------------------------
        public override ILogger GetLogger(string name)
        {
            ILogger logger = (ILogger)loggers[name];

            if (logger == null)
            {
                lock (this)
                {
                    logger = (ILogger)loggers[name];
                    if (logger == null)
                    {
                        ILogger newLogger = new LoggerTrace(name);
                        loggers.Add(name, newLogger);
                        logger = newLogger;
                    }
                }
            }
            return(logger);
        }         // GetLogger