private void GenFileLog(string str, eI2LogLevel thisLevel) { if (logLevel <= thisLevel) { Out(PreForLevel(thisLevel) + FileLog_GetPreText() + str); } }
private void GenFileLog(string str, eI2LogLevel thisLevel) { if (logLevel <= thisLevel) { KnownFiles.ioAppend(KnownFiles.eKnownFiles.Log, _2InfoDisplay_DebugOut.PreForLevel(thisLevel) + FileLog_GetPreText() + str); } }
public void Start() { logLevel = _2InfoDisplay_DebugOut.GetConfiguredLogLevel(); if (theForm != null) { throw new ArgumentException("theForm != null"); } theForm = _2InfoDisplay_FromApp_TheForm.CreateAndStart(AreWeReady); TheApp = this; }
public static string PreForLevel(eI2LogLevel thisLevel) { DateTime dt = DateTime.Now; string s1 = dt.ToString("dd/MM/yyyy HH:mm:ss.fff "); switch (thisLevel) { case eI2LogLevel.Debug_0: return(s1 + "Debug: "); case eI2LogLevel.Info_1: return(s1 + "Info : "); case eI2LogLevel.Error_2: return(s1 + "Error: "); } return("???"); }
public static eI2LogLevel GetConfiguredLogLevel() { eI2LogLevel ret = eI2LogLevel.Error_2; string cnf = ConfigurationManager.AppSettings["_2InfoDisplay.LogLevel"]; if (cnf != null) { switch (cnf) { case "Debug": ret = eI2LogLevel.Debug_0; break; case "Info": ret = eI2LogLevel.Info_1; break; case "Error": default: ret = eI2LogLevel.Error_2; break; } } return(ret); }
public void Start() { logLevel = _2InfoDisplay_DebugOut.GetConfiguredLogLevel(); Out(".Start"); }