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