// 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. /*============================================================ ** ** ** Purpose: ** Contains eventing constants defined by the Windows ** environment. ** ============================================================*/ #if ES_BUILD_STANDALONE #define FEATURE_MANAGED_ETW_CHANNELS #endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else namespace System.Diagnostics.Tracing #endif { using System; /// /// WindowsEventLevel. Custom values must be in the range from 16 through 255 /// public enum EventLevel { /// /// Log always /// LogAlways = 0, /// /// Only critical errors /// Critical, /// /// All errors, including previous levels /// Error, /// /// All warnings, including previous levels /// Warning, /// /// All informational events, including previous levels /// Informational, /// /// All events, including previous levels /// Verbose } /// /// WindowsEventTask. Custom values must be in the range from 1 through 65534 /// #if (!ES_BUILD_STANDALONE && !ES_BUILD_PN) [System.Runtime.CompilerServices.FriendAccessAllowed] #endif public enum EventTask { /// /// Undefined task /// None = 0 } /// /// EventOpcode. Custom values must be in the range from 11 through 239 /// #if (!ES_BUILD_STANDALONE && !ES_BUILD_PN) [System.Runtime.CompilerServices.FriendAccessAllowed] #endif public enum EventOpcode { /// /// An informational event /// Info = 0, /// /// An activity start event /// Start, /// /// An activity end event /// Stop, /// /// A trace collection start event /// DataCollectionStart, /// /// A trace collection end event /// DataCollectionStop, /// /// An extensional event /// Extension, /// /// A reply event /// Reply, /// /// An event representing the activity resuming from the suspension /// Resume, /// /// An event representing the activity is suspended, pending another activity's completion /// Suspend, /// /// An event representing the activity is transferred to another component, and can continue to work /// Send, /// /// An event representing receiving an activity transfer from another component /// Receive = 240 } // Added for CLR V4 /// /// EventChannel. Custom values must be in the range from 16 through 255. Currently only predefined values allowed. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", Justification = "Backwards compatibility")] #if (!ES_BUILD_STANDALONE && !ES_BUILD_PN) [System.Runtime.CompilerServices.FriendAccessAllowed] #endif public enum EventChannel : byte { /// /// No channel /// None = 0, // Channels 1 - 15 are reserved... /// The admin channel Admin = 16, /// The operational channel Operational = 17, /// The analytic channel Analytic = 18, /// The debug channel Debug = 19, }; /// /// EventOpcode /// [Flags] public enum EventKeywords : long { /// /// No events. /// None = 0x0, /// /// All Events /// All = ~0, /// /// Telemetry events /// MicrosoftTelemetry = 0x02000000000000, /// /// WDI context events /// WdiContext = 0x02000000000000, /// /// WDI diagnostic events /// WdiDiagnostic = 0x04000000000000, /// /// SQM events /// Sqm = 0x08000000000000, /// /// Failed security audits /// AuditFailure = 0x10000000000000, /// /// Successful security audits /// AuditSuccess = 0x20000000000000, /// /// Transfer events where the related Activity ID is a computed value and not a GUID /// N.B. The correct value for this field is 0x40000000000000. /// CorrelationHint = 0x10000000000000, /// /// Events raised using classic eventlog API /// EventLogClassic = 0x80000000000000 } }