Beispiel #1
0
        /// <summary>
        /// Set log level of logger by its name
        /// </summary>
        public void SetLevel(string name, LogLevel level)
        {
            var           loggerTree = name.Split('.');
            IModuleLogger logger     = _loggers[loggerTree[0]];

            foreach (var partialName in loggerTree.Skip(1))
            {
                logger = logger.First(l => l.Name.EndsWith(partialName));
            }

            SetLevel(logger, level);
        }