Example #1
0
 public Logger AddTarget(BaseTarget target)
 {
     if (target != null)
     {
         Targets.Add(target);
     }
     return(this);
 }
Example #2
0
        private static Logger CreateLogger(LoggerElement element)
        {
            Logger logger = new Logger(element.tag, (LogType)element.type, element.showTime);

            foreach (var targetEle in element.targets)
            {
                BaseTarget target = CreateTarget(targetEle);
                logger.AddTarget(target);
            }
            return(logger);
        }