示例#1
0
        public static NamedLogger GetLogger(string name, Encoding encoding = null)
        {
            NamedLogger logger;

            lock ( _loggerList )
            {
                if (!_loggerList.TryGetValue(name, out logger))
                {
                    logger = new NamedLogger(name, encoding);
                    _loggerList.Add(name, logger);
                }
            }
            return(logger);
        }
示例#2
0
 public static void CloseLogger(NamedLogger logger)
 {
     CloseLogger(logger.Name);
 }