| File: Diagnostics\Log\DiagnosticLogger.cs | Web Access |
| Project: src\roslyn\src\Features\Core\Portable\Microsoft.CodeAnalysis.Features.csproj (Microsoft.CodeAnalysis.Features) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.CodeAnalysis.Internal.Log; namespace Microsoft.CodeAnalysis.Diagnostics.Log; internal static class DiagnosticLogger { private const string From = nameof(From); private const string Id = nameof(Id); private const string HasDescription = nameof(HasDescription); private const string Uri = nameof(Uri); public static void LogHyperlink( string from, string id, bool description, bool telemetry, string uri) { Logger.Log(FunctionId.Diagnostics_HyperLink, KeyValueLogMessage.Create(static (m, args) => { var (from, telemetry, id, description, uri) = args; m[From] = from; m[Id] = telemetry ? id : id.GetHashCode().ToString(); m[HasDescription] = description; m[Uri] = telemetry ? uri : uri.GetHashCode().ToString(); }, (from, telemetry, id, description, uri))); } }