diff options
Diffstat (limited to 'src/vm/clrtracelogging.cpp')
-rw-r--r-- | src/vm/clrtracelogging.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/vm/clrtracelogging.cpp b/src/vm/clrtracelogging.cpp new file mode 100644 index 0000000000..64e572a106 --- /dev/null +++ b/src/vm/clrtracelogging.cpp @@ -0,0 +1,40 @@ +// 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. + +//***************************************************************************** +// clrttracelogging.cpp +// Telemetry Logging for clr.dll +// +//***************************************************************************** + +#include "common.h" +#include "clrtracelogging.h" +#include "TraceLoggingProvider.h" +#include "MicrosoftTelemetry.h" + +TRACELOGGING_DEFINE_PROVIDER(g_hClrProvider, CLR_PROVIDER_NAME, CLR_PROVIDER_ID, TraceLoggingOptionMicrosoftTelemetry()); + +// Used for initialization and deconstruction. +static CLRTraceLog::Provider g_clrTraceProvider(g_hClrProvider); + +//--- CLRTraceLogProvider + +// static +void CLRTraceLog::Logger::LogTargetFrameworkAttribute(LPCWSTR targetFrameworkAttribute, const char * assemblyName) +{ + STANDARD_VM_CONTRACT; + + EX_TRY + { + TraceLoggingWrite(g_hClrProvider,"CLR.AssemblyInfo", + TraceLoggingWideString(targetFrameworkAttribute, "TARGET_FRAMEWORK_ATTRIBUTE"), + TraceLoggingString(assemblyName, "ASSEMBLY_NAME"), + TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY)); + } + EX_CATCH{} + EX_END_CATCH(SwallowAllExceptions) + +} +//--- CLRTraceLog + |