public CrestronLoggerTraceListener (string initializeData) { string[] info = initializeData.Split (new char[] {' ', ',', ';'}); uint lev; bool logonly; if (info.Length == 0) return; if (info.Length > 0) { if (TryParsers.UInt32TryParse (info[0], out lev) && lev <= 10) _debugLevel = lev; if (info.Length > 1) { if (TryParsers.BooleanTryParse (info[1], out logonly)) _logOnlyThisLevel = logonly; if (info.Length > 2) { LoggerModeEnum le; try { le = (LoggerModeEnum)Enum.Parse (typeof (LoggerModeEnum), info[2], true); _loggerMode = le; } catch (ArgumentException) { } } } } }
private void SetState () { CMonitor.Enter (lockObject); savedDebugLevel = CrestronLogger.DebugLevel; savedLogOnlyThisLevel = CrestronLogger.LogOnlyCurrentDebugLevel; savedLoggerMode = CrestronLogger.Mode; CrestronLogger.DebugLevel = _debugLevel; CrestronLogger.LogOnlyCurrentDebugLevel = _logOnlyThisLevel; CrestronLogger.Mode = _loggerMode; }
public CrestronLoggerTraceListener (uint paramDebugLevel, bool logOnlyThisLevel, LoggerModeEnum loggerMode) : this (paramDebugLevel, logOnlyThisLevel) { _loggerMode = loggerMode; }