10 instantiations of LogTag
dotnet-svcutil-lib (10)
Shared\Utilities\LogTag.cs (10)
21public static LogTag Information { get; } = new LogTag("$I!#"); 22public static LogTag Important { get; } = new LogTag("$T!#"); 23public static LogTag Warning { get; } = new LogTag("$W!#"); 24public static LogTag Error { get; } = new LogTag("$E!#"); 25public static LogTag LogMessage { get; } = new LogTag("$L!#"); 27public static LogTag NewLine { get; } = new LogTag("$N!#"); 29public static LogTag TraceSuccess { get; } = new LogTag("$S!#"); 30public static LogTag TraceFailure { get; } = new LogTag("$F!#"); 31public static LogTag TraceProperty { get; } = new LogTag("$P!#"); 32public static LogTag TraceException { get; } = new LogTag("$X!#");
65 references to LogTag
dotnet-svcutil-lib (65)
DebugLogger.cs (18)
14private void LogMessage(string message, LogTag logTag, bool logToUI = false) 22if (logTag == LogTag.Error) 26else if (logTag == LogTag.Warning) 32ToolConsole.WriteLine(message, logToUI ? LogTag.Information : LogTag.LogMessage); 56ToolConsole.WriteLine(message, logToUI ? LogTag.Information : LogTag.LogMessage); 65return Task.Run(() => LogMessage(message, LogTag.LogMessage, logToUI)); 70return Task.Run(() => LogMessage(errorMessage, LogTag.Error, logToUI)); 75return Task.Run(() => LogMessage(warningMessage, LogTag.Warning, logToUI)); 95LogMessage(data, LogTag.LogMessage); 100LogMessage(data, LogTag.LogMessage); 105LogMessage(data, LogTag.LogMessage); 110LogMessage(data, LogTag.LogMessage); 115LogMessage(data, LogTag.Warning); 120LogMessage(data, LogTag.Error); 125LogMessage(data, LogTag.LogMessage); 150LogMessage(data, LogTag.Error);
MarkupTelemetryHelper.cs (5)
106ToolConsole.WriteLine(propName + LogTag.TraceProperty + propValue, LogTag.TraceProperty, ToolConsole.Space); 114ToolConsole.WriteLine(str, (succeess ? LogTag.TraceSuccess : LogTag.TraceFailure), ToolConsole.Space); 123ToolConsole.WriteLine(str, LogTag.TraceException, ToolConsole.Space);
Shared\Utilities\LogTag.cs (20)
21public static LogTag Information { get; } = new LogTag("$I!#"); 22public static LogTag Important { get; } = new LogTag("$T!#"); 23public static LogTag Warning { get; } = new LogTag("$W!#"); 24public static LogTag Error { get; } = new LogTag("$E!#"); 25public static LogTag LogMessage { get; } = new LogTag("$L!#"); 27public static LogTag NewLine { get; } = new LogTag("$N!#"); 29public static LogTag TraceSuccess { get; } = new LogTag("$S!#"); 30public static LogTag TraceFailure { get; } = new LogTag("$F!#"); 31public static LogTag TraceProperty { get; } = new LogTag("$P!#"); 32public static LogTag TraceException { get; } = new LogTag("$X!#"); 37if (string.IsNullOrEmpty(tag) || tag.Length != LogTag.s_tagLength || !tag.StartsWith(s_tagStart, StringComparison.Ordinal) || !tag.EndsWith(s_tagEnd, StringComparison.Ordinal)) 45public static implicit operator string(LogTag tag) 50public static bool IsTrace(LogTag tag) 52return tag == LogTag.TraceSuccess || tag == LogTag.TraceProperty || tag == LogTag.TraceFailure || tag == LogTag.TraceException || tag == LogTag.LogMessage; 60if (!string.IsNullOrEmpty(message) && message.Length >= LogTag.s_tagLength) 62tag = message.Substring(0, LogTag.s_tagLength);
Tool.cs (1)
252ToolConsole.WriteLineIf(options.ToolContext != OperationalContext.Infrastructure, filePath, LogTag.Important);
ToolConsole.cs (21)
87WriteLine(errMsg, isTrace ? LogTag.LogMessage : LogTag.Error); 98WriteLine(message, isTrace ? LogTag.LogMessage : LogTag.Warning); 103WriteLine(str, LogTag.Information, LogTag.NewLine); 106internal static void WriteLine(string str, LogTag logTag) 108WriteLine(str, logTag, LogTag.NewLine); 113WriteLineIf(condition, str, LogTag.Information); 116internal static void WriteLineIf(bool condition, string str, LogTag logTag) 120WriteLine(str, logTag, LogTag.NewLine); 124internal static void WriteLine(string str, LogTag logTag, string newLineReplacement) 130if (ToolConsole.Verbosity > Verbosity.Minimal || logTag == LogTag.Error || logTag == LogTag.Important || 131(ToolConsole.Verbosity == Verbosity.Minimal && logTag == LogTag.Warning) || LogTag.IsTrace(logTag)) 139if (logTag == LogTag.Warning) 145else if (logTag == LogTag.Error) 219ToolConsole.WriteLine(string.Format(SR.LogoFormat, Tool.ToolName, Tool.PackageVersion, SR.Microsoft_Copyright_CommandLine_Logo), LogTag.Important); 223ToolConsole.WriteLine(SR.TelemetryEnabled, LogTag.Information); 232ToolConsole.WriteLine(HelpGenerator.GenerateHelpText(), LogTag.Important);