Ejemplo n.º 1
0
        public Task SetLogLevel(string logName, int traceLevel)
        {
            var newTraceLevel = (Severity)traceLevel;

            logger.Info("SetLogLevel[{0}]={1}", logName, newTraceLevel);
            TraceLogger log = TraceLogger.FindLogger(logName);

            if (log == null)
            {
                throw new ArgumentException(string.Format("Logger {0} not found", logName));
            }

            log.SetSeverityLevel(newTraceLevel);
            return(TaskDone.Done);
        }