public void Emit(DiagnosticInfo info) { if (info.Kind == DiagnosticKind.Debug && !Verbose) return; var currentIndent = Indents.Sum(); var message = new string(' ', currentIndent) + info.Message; Console.WriteLine(message); Debug.WriteLine(message); }
public static void Warning(this ILog consumer, string msg, params object[] args) { var diagInfo = new DiagnosticInfo { Kind = DiagnosticKind.Warning, Message = string.Format(msg, args) }; consumer.Emit(diagInfo); }