Microsoft.IdentityModel.Logging Event source based logger to log different events. Static logger that is exposed externally. An external application or framework can hook up a listener to this event source to log data in a custom way. Flag which indicates whether or not PII is shown in logs. False by default. Flag which indicates whether or not complete is shown in logs when is set to true. False by default. String that is used in place of any arguments to log messages if the 'ShowPII' flag is set to false. String that is used in place of any arguments to log messages if the 'LogCompleteSecurityArtifact' flag is set to false. Indicates whether or the log message header (contains library version, date/time, and PII debugging information) has been written. The log message that indicates the current library version. The log message that indicates the date. The log message that is shown when PII is off. The log message that is shown when PII is off. Writes an event log by using the provided string argument and current UTC time. No level filtering is done on the event. The log message. No level filtering. Writes an event log by using the provided string argument, current UTC time and the provided arguments list. The log message. An object array that contains zero or more objects to format. Writes a verbose event log by using the provided string argument and current UTC time. The log message. Writes a verbose event log by using the provided string argument, current UTC time and the provided arguments list. The log message. An object array that contains zero or more objects to format. Writes an information event log by using the provided string argument and current UTC time. The log message. Writes an information event log by using the provided string argument, current UTC time and the provided arguments list. The log message. An object array that contains zero or more objects to format. Writes a warning event log by using the provided string argument and current UTC time. The log message. Writes a warning event log by using the provided string argument, current UTC time and the provided arguments list. The log message. An object array that contains zero or more objects to format. Writes an error event log by using the provided string argument and current UTC time. The log message. Writes an error event log by using the provided string argument, current UTC time and the provided arguments list. The log message. An object array that contains zero or more objects to format. Writes a critical event log by using the provided string argument and current UTC time. The log message. Writes a critical event log by using the provided string argument, current UTC time and the provided arguments list. The log message. An object array that contains zero or more objects to format. Writes an exception log by using the provided event identifer, exception argument, string argument and current UTC time. The log message. Writes an exception log by using the provided event identifer, exception argument, string argument, arguments list and current UTC time. The log message. An object array that contains zero or more objects to format. Minimum log level to log events. Default is Warning. Provides a way to add and remove telemetry data. Get the string that represents the client SKU. Get the string that represents the client version. Adds a key and its value to the collection of telemetry data. The name of the telemetry. The value of the telemetry. true if the key is successfully added; otherwise, false. Removes a key and its value from the collection of telemetry data. The name of the telemetry. true if the key is successfully removed; otherwise, false. Interface that provides an unsafe method to log a security artifact. SecurityToken and encoded token are considered as SecurityArtifacts. Returns a string that represents the complete security artifact. This may include sensitive information and should only be used for debugging purposes. A context class that can be used to store work per request to aid with debugging. Instantiates a new with the default activityId. Instantiates a new with an activityId. Gets or set a that will be used in the call to EventSource.SetCurrentThreadActivityId before logging. Gets or sets a boolean controlling if logs are written into the context. Useful when debugging. Gets or sets a string that helps with setting breakpoints when debugging. The collection of logs associated with a request. Use to control capture. Gets or sets an that enables custom extensibility scenarios. Helper class for logging. Gets or sets a logger to which logs will be written to. Indicates whether the log message header (contains library version, date/time, and PII debugging information) has been written. The log message that is shown when PII is off. The log message that is shown when PII is on. Logs an exception using the event source logger and returns new exception. argument that is null or empty. EventLevel is set to Error. Logs an exception using the event source logger and returns new typed exception. message to log. EventLevel is set to Error. Logs an argument exception using the event source logger and returns new typed exception. Identifies the argument whose value generated the ArgumentException. message to log. EventLevel is set to Error. Logs an exception using the event source logger and returns new typed exception. Format string of the log message. An object array that contains zero or more objects to format. EventLevel is set to Error. Logs an argument exception using the event source logger and returns new typed exception. Identifies the argument whose value generated the ArgumentException. Format string of the log message. An object array that contains zero or more objects to format. EventLevel is set to Error. Logs an exception using the event source logger and returns new typed exception. the inner to be added to the outer exception. message to log. EventLevel is set to Error. Logs an argument exception using the event source logger and returns new typed exception. Identifies the argument whose value generated the ArgumentException. the inner to be added to the outer exception. message to log. EventLevel is set to Error. Logs an exception using the event source logger and returns new typed exception. the inner to be added to the outer exception. Format string of the log message. An object array that contains zero or more objects to format. EventLevel is set to Error. Logs an argument exception using the event source logger and returns new typed exception. Identifies the argument whose value generated the ArgumentException. the inner to be added to the outer exception. Format string of the log message. An object array that contains zero or more objects to format. EventLevel is set to Error. Logs an exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. message to log. Logs an argument exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. Identifies the argument whose value generated the ArgumentException. message to log. Logs an exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. Format string of the log message. An object array that contains zero or more objects to format. Logs an argument exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. Identifies the argument whose value generated the ArgumentException. Format string of the log message. An object array that contains zero or more objects to format. Logs an exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. the inner to be added to the outer exception. message to log. Logs an argument exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. Identifies the argument whose value generated the ArgumentException. the inner to be added to the outer exception. message to log. Logs an exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. the inner to be added to the outer exception. Format string of the log message. An object array that contains zero or more objects to format. Logs an argument exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. Identifies the argument whose value generated the ArgumentException. the inner to be added to the outer exception. Format string of the log message. An object array that contains zero or more objects to format. Logs an exception using the event source logger. The exception to log. Logs an exception using the event source logger. Identifies the level of an event to be logged. The exception to log. Logs an information event. The log message. An object array that contains zero or more objects to format. Logs a verbose event. The log message. An object array that contains zero or more objects to format. Logs a warning event. The log message. An object array that contains zero or more objects to format. Logs an exception using the event source logger and returns new typed exception. Identifies the level of an event to be logged. Identifies the argument whose value generated the ArgumentException. the inner to be added to the outer exception. Format string of the log message. An object array that contains zero or more objects to format. Formats the string using InvariantCulture Format string. Format arguments. Formatted string. Marks a log message argument () as NonPII. A log message argument to be marked as NonPII. An argument marked as NonPII. Marking an argument as NonPII in calls will result in logging that argument in cleartext, regardless of the flag value. Marks a log message argument () as SecurityArtifact. A log message argument to be marked as SecurityArtifact. A callback function to log the security artifact safely. An argument marked as SecurityArtifact. Since even the payload may sometimes contain security artifacts, naïve disarm algorithms such as removing signatures will not work. For now the will only be leveraged if is set and no unsafe callback is provided. Future changes may introduce a support for best effort disarm logging. Marks a log message argument () as SecurityArtifact. A log message argument to be marked as SecurityArtifact. A callback function to log the security artifact safely. A callback function to log the security artifact without scrubbing. An argument marked as SecurityArtifact. if is null. if is null. Since even the payload may sometimes contain security artifacts, naïve disarm algorithms such as removing signatures will not work. For now the is currently unused. Future changes may introduce a support for best effort disarm logging which will leverage . Marks a log message argument () as SecurityArtifact. A log message argument to be marked as SecurityArtifact. A callback function to log the security artifact without scrubbing. An argument marked as SecurityArtifact. if is null. Creates a by using the provided event level, exception argument, string argument and arguments list. The log message. An object array that contains zero or more objects to format. Log messages and codes for Microsoft.IdentityModel.Logging An internal structure that is used to mark an argument as NonPII. Arguments wrapped with a NonPII structure will be considered as NonPII in the message logging process. Argument wrapped with a structure is considered as NonPII in the message logging process. Creates an instance of that wraps the . An argument that is considered as NonPII. Returns a string that represents the . Null if the is , otherwise calls method of the . An internal structure that is used to mark an argument as SecurityArtifact. Arguments wrapped with a SecurityArtifact structure will be considered as a SecurityArtifact in the message logging process. SecurityToken and encoded token are considered as SecurityArtifacts. Argument wrapped with a structure is considered as SecurityArtifact in the message logging process. The ToString callback delegate that returns a disarmed SecurityArtifact. The ToString callback delegate that returns an unscrubbed SecurityArtifact. Creates an instance of that wraps the . An argument that is considered as SecurityArtifact. A callback used to disarm the token. Since even the payload may sometimes contain security artifacts, naïve disarm algorithms (such as removing signatures in the case of JWTs) will not work. For now the will only be leveraged if is set and no unsafe callback is provided. Future changes may introduce a support for best effort disarm logging. Creates an instance of that wraps the . An argument that is considered as SecurityArtifact. A ToString callback. A ToString callback which will return the unscrubbed artifact. Since even the payload may sometimes contain security artifacts, naïve disarm algorithms (such as removing signatures in the case of JWTs) will not work. For now the is currently unused. Future changes may introduce a support for best effort disarm logging which will leverage . A dummy callback which can be leveraged to return a standard scrubbed token in the case where expected token is unknown. Ignored token. The standard scrubbed token string. Returns a string that represents the . Null if the is , otherwise calls the provided safe callback on . Event listener that writes logs to a file or a fileStream provided by user. Name of the default log file, excluding its path. Initializes a new instance of that writes logs to text file. Initializes a new instance of that writes logs to text file. location of the file where log messages will be written. Initializes a new instance of that writes logs to text file. StreamWriter where logs will be written. Called whenever an event has been written by an event source for which the event listener has enabled events. Releases all resources used by the current instance of the class. Indicates that the specified method requires dynamic access to code that is not referenced statically, for example through . This allows tools to understand which methods are unsafe to call when removing unreferenced code from an application. Initializes a new instance of the class with the specified message. A message that contains information about the usage of unreferenced code. Gets a message that contains information about the usage of unreferenced code. Gets or sets an optional URL that contains more information about the method, why it requires unreferenced code, and what options a consumer has to deal with it. Suppresses reporting of a specific rule violation, allowing multiple suppressions on a single code artifact. is different than in that it doesn't have a . So it is always preserved in the compiled assembly. Initializes a new instance of the class, specifying the category of the tool and the identifier for an analysis rule. The category for the attribute. The identifier of the analysis rule the attribute applies to. Gets the category identifying the classification of the attribute. The property describes the tool or tool analysis category for which a message suppression attribute applies. Gets the identifier of the analysis tool rule to be suppressed. Concatenated together, the and properties form a unique check identifier. Gets or sets the scope of the code that is relevant for the attribute. The Scope property is an optional argument that specifies the metadata scope for which the attribute is relevant. Gets or sets a fully qualified path that represents the target of the attribute. The property is an optional argument identifying the analysis target of the attribute. An example value is "System.IO.Stream.ctor():System.Void". Because it is fully qualified, it can be long, particularly for targets such as parameters. The analysis tool user interface should be capable of automatically formatting the parameter. Gets or sets an optional argument expanding on exclusion criteria. The property is an optional argument that specifies additional exclusion where the literal metadata target is not sufficiently precise. For example, the cannot be applied within a method, and it may be desirable to suppress a violation against a statement in the method that will give a rule violation, but not against all statements in the method. Gets or sets the justification for suppressing the code analysis message. Initializes a new instance of the class with the specified member types. The types of members dynamically accessed. Gets the which specifies the type of members dynamically accessed. Specifies the types of members that are dynamically accessed. This enumeration has a attribute that allows a bitwise combination of its member values. Specifies no members. Specifies the default, parameterless public constructor. Specifies all public constructors. Specifies all non-public constructors. Specifies all public methods. Specifies all non-public methods. Specifies all public fields. Specifies all non-public fields. Specifies all public nested types. Specifies all non-public nested types. Specifies all public properties. Specifies all non-public properties. Specifies all public events. Specifies all non-public events. Specifies all interfaces implemented by the type. Specifies all members.