public ConsoleLogger( Func <Diagnostic, string> format = null, DiagnosticSeverity verbosity = DiagnosticSeverity.Hint, IEnumerable <int> noWarn = null, int lineNrOffset = 0) : base(verbosity, noWarn, lineNrOffset) => this.applyFormatting = format ?? Formatting.HumanReadableFormat;
private static DiagnosticSeverity ToDiagnosticSeverity(LSP.DiagnosticSeverity severity) { switch (severity) { case LSP.DiagnosticSeverity.Error: return(DiagnosticSeverity.Error); case LSP.DiagnosticSeverity.Warning: return(DiagnosticSeverity.Warning); case LSP.DiagnosticSeverity.Information: return(DiagnosticSeverity.Info); case LSP.DiagnosticSeverity.Hint: return(DiagnosticSeverity.Hidden); default: throw new InvalidOperationException("Unknown severity"); } }
public static LogLevel MapLevel(LSP.DiagnosticSeverity original) { switch (original) { case LSP.DiagnosticSeverity.Error: return(LogLevel.Error); case LSP.DiagnosticSeverity.Warning: return(LogLevel.Warning); case LSP.DiagnosticSeverity.Information: return(LogLevel.Information); case LSP.DiagnosticSeverity.Hint: return(LogLevel.Debug); default: return(LogLevel.Trace); } }