//(ILoggerServiceFactory loggerFactory)
        public LogManagerService()
        {
            this._loggerFactory =new LoggerServiceFactory(); //loggerFactory;
            var loggerKeys = (loggerServiceKeys != null) ? loggerServiceKeys.Split(',') : new string[] { };
            if (loggerKeys.Any())
                primaryLoggerKey = loggerKeys[0];

            if (loggerKeys.Length > 1)
                secondaryLoggerKey = loggerKeys[1];
            if (!string.IsNullOrWhiteSpace(logLevelTypeNames))
            {
                var levelList = logLevelTypeNames.Split(',');
               levelList.ToList().ForEach(c =>
                                                       { if (logLevels != null) logLevels.Add(LogLevel.FromName(c)); }) ;
            }
        }
Example #2
0
        public LogManagerService(ILoggerServiceFactory loggerFactory)
        {
            this.loggerFactory = loggerFactory;
            var loggerKeys = (loggerServiceKeys != null) ? loggerServiceKeys.Split(',') : new string[] { };

            if (loggerKeys.Any())
            {
                primaryLoggerKey = loggerKeys[0];
            }

            if (loggerKeys.Length > 1)
            {
                secondaryLoggerKey = loggerKeys[1];
            }
            if (!string.IsNullOrWhiteSpace(logLevelTypeNames))
            {
                var levelList = logLevelTypeNames.Split(',');
                logLevels = levelList.Select(l => LogLevel.FromDisplayName <LogLevel>(l)).ToList();
            }
        }
 public LogManagerController(ILoggerServiceFactory service)
 {
     _service = service;
 }