Beispiel #1
0
        public static MultiLogger GetNewLogger(String name)
        {
            var instance = new MultiLogger(name);

            NamedLoggers.Add(instance);
            return(instance);
        }
Beispiel #2
0
        /// <summary>
        /// Try to find Multilogger that
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static MultiLogger GetLoggerByName(String name)
        {
            if (String.IsNullOrEmpty(name))
            {
                name = "MultiLogger";
            }
            MultiLogger instance = NamedLoggers.Find(x => x.Name.Equals(name));

            if (instance != null)
            {
                return(instance);
            }
            return(GetNewLogger(name));
        }