148 references to Emoji
Microsoft.DotNet.HotReload.Watch (148)
Process\ProjectLauncher.cs (2)
78
(EnvironmentOptions.SuppressEmojis ?
Emoji
.Default :
Emoji
.Agent).GetLogMessagePrefix(EnvironmentOptions.LogMessagePrefix) + $"[{projectDisplayName}]";
UI\ConsoleReporter.cs (3)
23
private void WriteLine(TextWriter writer, string message, ConsoleColor? color,
Emoji
emoji)
28
writer.Write((suppressEmojis ?
Emoji
.Default : emoji).GetLogMessagePrefix(logMessagePrefix));
45
public void Report(EventId id,
Emoji
emoji, LogLevel level, string message)
UI\IReporter.cs (143)
34
public static string ToDisplay(this
Emoji
emoji)
37
Emoji
.Default => ":",
38
Emoji
.Warning => "⚠",
39
Emoji
.Error => "❌",
40
Emoji
.HotReload => "🔥",
41
Emoji
.Watch => "⌚",
42
Emoji
.Stop => "🛑",
43
Emoji
.Restart => "🔄",
44
Emoji
.Launch => "🚀",
45
Emoji
.Wait => "⏳",
46
Emoji
.Aspire => "⭐",
47
Emoji
.Browser => "🌐",
48
Emoji
.Agent => "🕵️",
49
Emoji
.Build => "🔨",
50
Emoji
.Refresh => "🔃",
51
Emoji
.LightBulb => "💡",
55
public static string GetLogMessagePrefix(this
Emoji
emoji, string logMessagePrefix)
109
var
emoji = logLevel switch
111
_ when descriptor != null && descriptor.Emoji !=
Emoji
.Default => descriptor.Emoji,
112
LogLevel.Error =>
Emoji
.Error,
113
LogLevel.Warning =>
Emoji
.Warning,
114
_ when MessageDescriptor.ComponentEmojis.TryGetValue(name, out
var
componentEmoji) => componentEmoji,
115
_ =>
Emoji
.Watch
136
internal abstract class MessageDescriptor(string? format,
Emoji
emoji, LogLevel level, EventId id)
142
public
Emoji
Emoji { get; } = emoji;
146
private static MessageDescriptor<None> Create(string format,
Emoji
emoji, LogLevel level)
149
private static MessageDescriptor<TArgs> Create<TArgs>(string format,
Emoji
emoji, LogLevel level)
153
private static MessageDescriptor<TArgs> Create<TArgs>(LogEvent<TArgs> logEvent,
Emoji
emoji)
161
=> Create<TArgs>(new EventId(++s_id), format: null,
Emoji
.Default, LogLevel.None);
163
private static MessageDescriptor<TArgs> Create<TArgs>(EventId id, string? format,
Emoji
emoji, LogLevel level)
173
public static readonly ImmutableDictionary<string,
Emoji
> ComponentEmojis = ImmutableDictionary<string,
Emoji
>.Empty
174
.Add(DotNetWatchContext.DefaultLogComponentName,
Emoji
.Watch)
175
.Add(DotNetWatchContext.BuildLogComponentName,
Emoji
.Build)
176
.Add(HotReloadDotNetWatcher.ClientLogComponentName,
Emoji
.HotReload)
177
.Add(HotReloadDotNetWatcher.AgentLogComponentName,
Emoji
.Agent)
178
.Add(BrowserRefreshServer.ServerLogComponentName,
Emoji
.Refresh)
179
.Add(BrowserConnection.AgentLogComponentName,
Emoji
.Agent)
180
.Add(BrowserConnection.ServerLogComponentName,
Emoji
.Browser)
181
.Add(AspireServiceFactory.AspireLogComponentName,
Emoji
.Aspire);
184
public static readonly MessageDescriptor<string> CommandDoesNotSupportHotReload = Create<string>("Command '{0}' does not support Hot Reload.",
Emoji
.HotReload, LogLevel.Debug);
185
public static readonly MessageDescriptor<None> HotReloadDisabledByCommandLineSwitch = Create("Hot Reload disabled by command line switch.",
Emoji
.HotReload, LogLevel.Debug);
186
public static readonly MessageDescriptor<None> HotReloadSessionStarted = Create("Hot reload session started.",
Emoji
.HotReload, LogLevel.Debug);
188
public static readonly MessageDescriptor<int> ProjectsRebuilt = Create<int>("Projects rebuilt ({0})",
Emoji
.HotReload, LogLevel.Debug);
189
public static readonly MessageDescriptor<int> ProjectsRestarted = Create<int>("Projects restarted ({0})",
Emoji
.HotReload, LogLevel.Debug);
191
public static readonly MessageDescriptor<None> ProjectRestarting = Create("Restarting ...",
Emoji
.Watch, LogLevel.Debug);
192
public static readonly MessageDescriptor<None> ProjectRestarted = Create("Restarted",
Emoji
.Watch, LogLevel.Debug);
193
public static readonly MessageDescriptor<None> ProjectRelaunching = Create("Relaunching ...",
Emoji
.Watch, LogLevel.Information);
194
public static readonly MessageDescriptor<None> ProjectRelaunched = Create("Relaunched",
Emoji
.Watch, LogLevel.Debug);
195
public static readonly MessageDescriptor<None> ProcessCrashedAndWillBeRelaunched = Create("Process crashed and will be relaunched on file change",
Emoji
.Watch, LogLevel.Debug);
196
public static readonly MessageDescriptor<int> ProjectDependenciesDeployed = Create<int>("Project dependencies deployed ({0})",
Emoji
.HotReload, LogLevel.Debug);
197
public static readonly MessageDescriptor<None> FixBuildError = Create("Fix the error to continue or press Ctrl+C to exit.",
Emoji
.Watch, LogLevel.Warning);
198
public static readonly MessageDescriptor<None> WaitingForChanges = Create("Waiting for changes",
Emoji
.Watch, LogLevel.Information);
199
public static readonly MessageDescriptor<(string, string, int)> LaunchedProcess = Create<(string, string, int)>("Launched '{0}' with arguments '{1}': process id {2}",
Emoji
.Launch, LogLevel.Debug);
200
public static readonly MessageDescriptor<long> ManagedCodeChangesApplied = Create<long>("C# and Razor changes applied in {0}ms.",
Emoji
.HotReload, LogLevel.Information);
201
public static readonly MessageDescriptor<long> StaticAssetsChangesApplied = Create<long>("Static asset changes applied in {0}ms.",
Emoji
.HotReload, LogLevel.Information);
202
public static readonly MessageDescriptor<None> StaticWebAssetManifestNotFound = Create("Static web asset manifest not found.",
Emoji
.Warning, LogLevel.Warning);
203
public static readonly MessageDescriptor<string> ScopedCssBundleFileNotFound = Create<string>("Scoped CSS bundle file '{BundleFile}' not found.",
Emoji
.Warning, LogLevel.Warning);
205
public static readonly MessageDescriptor<int> SendingUpdateBatch = Create(LogEvents.SendingUpdateBatch,
Emoji
.HotReload);
206
public static readonly MessageDescriptor<int> UpdateBatchCompleted = Create(LogEvents.UpdateBatchCompleted,
Emoji
.HotReload);
207
public static readonly MessageDescriptor<int> UpdateBatchFailed = Create(LogEvents.UpdateBatchFailed,
Emoji
.HotReload);
208
public static readonly MessageDescriptor<int> UpdateBatchCanceled = Create(LogEvents.UpdateBatchCanceled,
Emoji
.HotReload);
209
public static readonly MessageDescriptor<(int, string)> UpdateBatchFailedWithError = Create(LogEvents.UpdateBatchFailedWithError,
Emoji
.HotReload);
210
public static readonly MessageDescriptor<(int, string)> UpdateBatchExceptionStackTrace = Create(LogEvents.UpdateBatchExceptionStackTrace,
Emoji
.HotReload);
211
public static readonly MessageDescriptor<string> Capabilities = Create(LogEvents.Capabilities,
Emoji
.HotReload);
212
public static readonly MessageDescriptor<string> ProjectSpecifiesCapabilities = Create(LogEvents.ProjectSpecifiesCapabilities,
Emoji
.HotReload);
213
public static readonly MessageDescriptor<(Version, string)> UsingCapabilitiesBasedOnTargetFrameworkVersion = Create(LogEvents.UsingCapabilitiesBasedOnTargetFrameworkVersion,
Emoji
.HotReload);
214
public static readonly MessageDescriptor<None> WaitingForFileChangeBeforeRestarting = Create("Waiting for a file to change before restarting ...",
Emoji
.Wait, LogLevel.Warning);
215
public static readonly MessageDescriptor<None> WatchingWithHotReload = Create("Watching with Hot Reload.",
Emoji
.Watch, LogLevel.Debug);
216
public static readonly MessageDescriptor<None> RestartInProgress = Create("Restart in progress.",
Emoji
.Restart, LogLevel.Information);
217
public static readonly MessageDescriptor<None> RestartRequested = Create("Restart requested.",
Emoji
.Restart, LogLevel.Information);
218
public static readonly MessageDescriptor<None> Restarting = Create("Restarting.",
Emoji
.Restart, LogLevel.Information);
219
public static readonly MessageDescriptor<None> ShutdownRequested = Create("Shutdown requested. Press Ctrl+C again to force exit.",
Emoji
.Stop, LogLevel.Information);
220
public static readonly MessageDescriptor<string> ApplyUpdate_Error = Create<string>("{0}",
Emoji
.Error, LogLevel.Error);
221
public static readonly MessageDescriptor<string> ApplyUpdate_Warning = Create<string>("{0}",
Emoji
.Warning, LogLevel.Warning);
222
public static readonly MessageDescriptor<string> ApplyUpdate_Verbose = Create<string>("{0}",
Emoji
.Default, LogLevel.Debug);
223
public static readonly MessageDescriptor<string> ApplyUpdate_AutoVerbose = Create<string>("{0}",
Emoji
.Default, LogLevel.Debug);
224
public static readonly MessageDescriptor<string> ApplyUpdate_ChangingEntryPoint = Create<string>("{0} Press \"Ctrl + R\" to restart.",
Emoji
.Warning, LogLevel.Warning);
225
public static readonly MessageDescriptor<None> ConfiguredToLaunchBrowser = Create("Configured to launch a browser on ASP.NET Core application startup.",
Emoji
.Watch, LogLevel.Debug);
226
public static readonly MessageDescriptor<None> UsingBrowserRefreshMiddleware = Create("Using browser-refresh middleware",
Emoji
.Default, LogLevel.Debug);
227
public static readonly MessageDescriptor<string> BrowserRefreshSuppressedViaEnvironmentVariable_ManualRefreshRequired = Create<string>("Browser refresh is suppressed via environment variable '{0}'. To reload static assets after an update refresh browser manually.",
Emoji
.Watch, LogLevel.Debug);
228
public static readonly MessageDescriptor<string> BrowserRefreshSuppressedViaEnvironmentVariable_ApplicationWillBeRestarted = Create<string>("Browser refresh is suppressed via environment variable '{0}'. Application will be restarted when updated.",
Emoji
.Watch, LogLevel.Warning);
229
public static readonly MessageDescriptor<None> BrowserRefreshNotSupportedByProjectTargetFramework_ManualRefreshRequired = Create("Browser refresh is not supported by the project target framework. To reload static assets after an update refresh browser manually. For more information see 'https://aka.ms/dotnet/watch/unsupported-tfm'.",
Emoji
.Watch, LogLevel.Warning);
230
public static readonly MessageDescriptor<None> BrowserRefreshNotSupportedByProjectTargetFramework_ApplicationWillBeRestarted = Create("Browser refresh is not supported by the project target framework. Application will be restarted when updated. For more information see 'https://aka.ms/dotnet/watch/unsupported-tfm'.",
Emoji
.Watch, LogLevel.Warning);
231
public static readonly MessageDescriptor<None> UpdatingDiagnostics = Create(LogEvents.UpdatingDiagnostics,
Emoji
.Default);
232
public static readonly MessageDescriptor<None> FailedToReceiveResponseFromConnectedBrowser = Create(LogEvents.FailedToReceiveResponseFromConnectedBrowser,
Emoji
.Default);
233
public static readonly MessageDescriptor<None> NoBrowserConnected = Create(LogEvents.NoBrowserConnected,
Emoji
.Default);
234
public static readonly MessageDescriptor<string> LaunchingBrowser = Create<string>("Launching browser: {0}",
Emoji
.Default, LogLevel.Debug);
235
public static readonly MessageDescriptor<(string, string)> LaunchingBrowserWithUrl = Create<(string, string)>("Launching browser: {0} {1}",
Emoji
.Default, LogLevel.Debug);
236
public static readonly MessageDescriptor<None> RefreshingBrowser = Create(LogEvents.RefreshingBrowser,
Emoji
.Default);
237
public static readonly MessageDescriptor<None> ReloadingBrowser = Create(LogEvents.ReloadingBrowser,
Emoji
.Default);
238
public static readonly MessageDescriptor<string> RefreshServerRunningAt = Create(LogEvents.RefreshServerRunningAt,
Emoji
.Default);
239
public static readonly MessageDescriptor<None> ConnectedToRefreshServer = Create(LogEvents.ConnectedToRefreshServer,
Emoji
.Default);
240
public static readonly MessageDescriptor<None> RestartingApplicationToApplyChanges = Create("Restarting application to apply changes ...",
Emoji
.Default, LogLevel.Information);
241
public static readonly MessageDescriptor<None> RestartingApplication = Create("Restarting application ...",
Emoji
.Default, LogLevel.Information);
242
public static readonly MessageDescriptor<(string, ChangeKind, string)> IgnoringChangeInHiddenDirectory = Create<(string, ChangeKind, string)>("Ignoring change in hidden directory '{0}': {1} '{2}'",
Emoji
.Watch, LogLevel.Trace);
243
public static readonly MessageDescriptor<(ChangeKind, string)> IgnoringChangeInOutputDirectory = Create<(ChangeKind, string)>("Ignoring change in output directory: {0} '{1}'",
Emoji
.Watch, LogLevel.Trace);
244
public static readonly MessageDescriptor<(string, ChangeKind, string, string, string)> IgnoringChangeInExcludedFile = Create<(string, ChangeKind, string, string, string)>("Ignoring change in excluded file '{0}': {1}. Path matches {2} glob '{3}' set in '{4}'.",
Emoji
.Watch, LogLevel.Trace);
245
public static readonly MessageDescriptor<string> FileAdditionTriggeredReEvaluation = Create<string>("File addition triggered re-evaluation: '{0}'.",
Emoji
.Watch, LogLevel.Debug);
246
public static readonly MessageDescriptor<string> ProjectChangeTriggeredReEvaluation = Create<string>("Project change triggered re-evaluation: '{0}'.",
Emoji
.Watch, LogLevel.Debug);
247
public static readonly MessageDescriptor<None> ReEvaluationCompleted = Create("Re-evaluation completed.",
Emoji
.Watch, LogLevel.Debug);
248
public static readonly MessageDescriptor<None> NoManagedCodeChangesToApply = Create("No managed code changes to apply.",
Emoji
.Watch, LogLevel.Information);
249
public static readonly MessageDescriptor<None> Exited = Create("Exited",
Emoji
.Watch, LogLevel.Information);
250
public static readonly MessageDescriptor<None> ExitedWithUnknownErrorCode = Create("Exited with unknown error code",
Emoji
.Error, LogLevel.Error);
251
public static readonly MessageDescriptor<int> ExitedWithErrorCode = Create<int>("Exited with error code {0}",
Emoji
.Error, LogLevel.Error);
252
public static readonly MessageDescriptor<(string, string, string)> FailedToLaunchProcess = Create<(string, string, string)>("Failed to launch '{0}' with arguments '{1}': {2}",
Emoji
.Error, LogLevel.Error);
253
public static readonly MessageDescriptor<string> ApplicationFailed = Create<string>("Application failed: {0}",
Emoji
.Error, LogLevel.Error);
254
public static readonly MessageDescriptor<(int, long, int?)> ProcessRunAndExited = Create<(int, long, int?)>("Process id {0} ran for {1}ms and exited with exit code {2}.",
Emoji
.Watch, LogLevel.Debug);
255
public static readonly MessageDescriptor<(int, int)> WaitingForProcessToExitWithin = Create<(int, int)>("Waiting for process {0} to exit within {1}s.",
Emoji
.Watch, LogLevel.Debug);
256
public static readonly MessageDescriptor<(int, int)> WaitingForProcessToExit = Create<(int, int)>("Waiting for process {0} to exit ({1}).",
Emoji
.Watch, LogLevel.Debug);
257
public static readonly MessageDescriptor<(int, string)> FailedToKillProcess = Create<(int, string)>("Failed to kill process {0}: {1}.",
Emoji
.Error, LogLevel.Error);
258
public static readonly MessageDescriptor<(int, string)> TerminatingProcess = Create<(int, string)>("Terminating process {0} ({1}).",
Emoji
.Watch, LogLevel.Debug);
259
public static readonly MessageDescriptor<(string, int, string)> FailedToSendSignalToProcess = Create<(string, int, string)>("Failed to send {0} signal to process {1}: {2}",
Emoji
.Warning, LogLevel.Warning);
260
public static readonly MessageDescriptor<(string, int, string)> ErrorReadingProcessOutput = Create<(string, int, string)>("Error reading {0} of process {1}: {2}",
Emoji
.Watch, LogLevel.Debug);
261
public static readonly MessageDescriptor<string> SendingStaticAssetUpdateRequest = Create(LogEvents.SendingStaticAssetUpdateRequest,
Emoji
.Default);
262
public static readonly MessageDescriptor<string> HotReloadCapabilities = Create<string>("Hot reload capabilities: {0}.",
Emoji
.HotReload, LogLevel.Debug);
263
public static readonly MessageDescriptor<None> HotReloadSuspended = Create("Hot reload suspended. To continue hot reload, press \"Ctrl + R\".",
Emoji
.HotReload, LogLevel.Information);
264
public static readonly MessageDescriptor<None> UnableToApplyChanges = Create("Unable to apply changes due to compilation errors.",
Emoji
.HotReload, LogLevel.Information);
265
public static readonly MessageDescriptor<None> RestartNeededToApplyChanges = Create("Restart is needed to apply the changes.",
Emoji
.HotReload, LogLevel.Information);
266
public static readonly MessageDescriptor<None> HotReloadEnabled = Create("Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.",
Emoji
.HotReload, LogLevel.Information);
267
public static readonly MessageDescriptor<Version> ProjectDoesNotSupportHotReload_TargetFramework = Create<Version>("Project does not support Hot Reload: Target Framework is older than {0}. Application will be restarted when updated.",
Emoji
.Warning, LogLevel.Warning);
268
public static readonly MessageDescriptor<(string, string, string, string)> ProjectDoesNotSupportHotReload_Property = Create<(string, string, string, string)>("Project does not support Hot Reload: '{0}' property is '{1}'. Application will be restarted when updated. Set '{2}' project property to '{3}' to enable Hot Reload.",
Emoji
.Warning, LogLevel.Warning);
269
public static readonly MessageDescriptor<None> PressCtrlRToRestart = Create("Press Ctrl+R to restart.",
Emoji
.LightBulb, LogLevel.Information);
270
public static readonly MessageDescriptor<(string, string)> ApplicationKind_BlazorHosted = Create<(string, string)>("Application kind: BlazorHosted. '{0}' references BlazorWebAssembly project '{1}'.",
Emoji
.Default, LogLevel.Debug);
271
public static readonly MessageDescriptor<None> ApplicationKind_BlazorWebAssembly = Create("Application kind: BlazorWebAssembly.",
Emoji
.Default, LogLevel.Debug);
272
public static readonly MessageDescriptor<None> ApplicationKind_WebApplication = Create("Application kind: WebApplication.",
Emoji
.Default, LogLevel.Debug);
273
public static readonly MessageDescriptor<None> ApplicationKind_Default = Create("Application kind: Default.",
Emoji
.Default, LogLevel.Debug);
274
public static readonly MessageDescriptor<None> ApplicationKind_WebSockets = Create("Application kind: WebSockets.",
Emoji
.Default, LogLevel.Debug);
275
public static readonly MessageDescriptor<int> WatchingFilesForChanges = Create<int>("Watching {0} file(s) for changes",
Emoji
.Watch, LogLevel.Debug);
276
public static readonly MessageDescriptor<string> WatchingFilesForChanges_FilePath = Create<string>("> {0}",
Emoji
.Watch, LogLevel.Trace);
277
public static readonly MessageDescriptor<None> LoadingProjects = Create("Loading projects ...",
Emoji
.Watch, LogLevel.Information);
278
public static readonly MessageDescriptor<(int, double)> LoadedProjects = Create<(int, double)>("Loaded {0} project(s) in {1:0.0}s.",
Emoji
.Watch, LogLevel.Information);
279
public static readonly MessageDescriptor<string> Building = Create<string>("Building {0} ...",
Emoji
.Default, LogLevel.Debug);
280
public static readonly MessageDescriptor<string> Restoring = Create<string>("Restoring {0} ...",
Emoji
.Default, LogLevel.Debug);
281
public static readonly MessageDescriptor<string> BuildFailed = Create<string>("Build failed: {0}",
Emoji
.Default, LogLevel.Debug);
282
public static readonly MessageDescriptor<string> BuildSucceeded = Create<string>("Build succeeded: {0}",
Emoji
.Default, LogLevel.Debug);
283
public static readonly MessageDescriptor<string> RestoreFailed = Create<string>("Restore failed: {0}",
Emoji
.Default, LogLevel.Debug);
284
public static readonly MessageDescriptor<string> RestoreSucceeded = Create<string>("Restore succeeded: {0}",
Emoji
.Default, LogLevel.Debug);
287
public static readonly MessageDescriptor<string> ManifestFileNotFound = Create(LogEvents.ManifestFileNotFound,
Emoji
.Default);
288
public static readonly MessageDescriptor<None> NoDevicesAvailable = Create("No devices are available for this project.",
Emoji
.Error, LogLevel.Error);
289
public static readonly MessageDescriptor<(string, string)> FileSpecifiesMultipleTargetFrameworks = Create<(string, string)>("File '{0}' specifies multiple target frameworks: '{1}'. Specify which framework to run using '--framework'.",
Emoji
.Watch, LogLevel.Error);
292
internal sealed class MessageDescriptor<TArgs>(string? format,
Emoji
emoji, LogLevel level, EventId id)
338
void Report(EventId id,
Emoji
emoji, LogLevel level, string message);