void Log(EErrorLevel level, string format, params object[] args) { _allInfos.Add(new LogInfo() { level = level, info = string.Format(format, args) }); }
internal void Log(Exception ex, string additionalInfo = "", EErrorLevel errorLevel = EErrorLevel.Error, bool activate = true) { Log( ex.GetType() + (string.IsNullOrWhiteSpace(additionalInfo) ? "" : " (" + additionalInfo + ") ") + ":\r\n" + ex.ToString(), errorLevel, activate); }
public void HandlerLog(EWorkStage stage, EErrorLevel level, ETipsType type, string fileName, int lineNum, int colNum, params object[] args) { string lineInfo = (lineNum >= 0 ? ":" + lineNum.ToString() : "") + (colNum >= 0 ? ", " + colNum.ToString() : ""); Log(level, $"{stage} {level}_{((int)type)}: {fileName} {lineInfo} : {string.Format(GetFormat(type), args)}\n"); if (level == EErrorLevel.ERROR) { Exit(); } }
internal void Log(string msg, EErrorLevel errorLevel = EErrorLevel.Debug, bool activate = false) { if (errorLevel < LogLevel) { return; } try { _vsOutputWindowPane.OutputString(msg + "\r\n"); if (activate) { _vsOutputWindowPane.Activate(); } } catch { } }
/// <summary>Get the background colour associated with this error level</summary> public static Colour32 Background(this EErrorLevel lvl) { return(lvl.Assoc <uint>("bg")); }
/// <summary>Get the foreground colour associated with this error level</summary> public static Colour32 Foreground(this EErrorLevel lvl) { return(lvl.Assoc <uint>("fg")); }