Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​IdentityModel.​Logging.​IdentityModelEventSource

Assembly: Microsoft.IdentityModel.Logging

Inheritance: object → System.​Diagnostics.​Tracing.​EventSource → IdentityModelEventSource

Implemented Interfaces

Event source based logger to log different events.

Properties

public static IdentityModelEventSource
Logger
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.
public static bool
ShowPII
Flag which indicates whether or not PII is shown in logs. False by default.
public static string
HiddenPIIString
String that is used in place of any arguments to log messages if the 'ShowPII' flag is set to false.
public static bool
HeaderWritten
Indicates whether or the log message header (contains library version, date/time, and PII debugging information) has been written.
Minimum log level to log events. Default is Warning.
ConstructionException
Guid
public string
Name

Methods

public void
WriteAlways​(string message)
Writes an event log by using the provided string argument and current UTC time. No level filtering is done on the event.
message The log message.
Remarks No level filtering.
public void
WriteAlways​(string message, object[] args)
Writes an event log by using the provided string argument, current UTC time and the provided arguments list.
message The log message.
args An object array that contains zero or more objects to format.
public void
WriteVerbose​(string message)
Writes a verbose event log by using the provided string argument and current UTC time.
message The log message.
public void
WriteVerbose​(string message, object[] args)
Writes a verbose event log by using the provided string argument, current UTC time and the provided arguments list.
message The log message.
args An object array that contains zero or more objects to format.
public void
WriteInformation​(string message)
Writes an information event log by using the provided string argument and current UTC time.
message The log message.
public void
WriteInformation​(string message, object[] args)
Writes an information event log by using the provided string argument, current UTC time and the provided arguments list.
message The log message.
args An object array that contains zero or more objects to format.
public void
WriteWarning​(string message)
Writes a warning event log by using the provided string argument and current UTC time.
message The log message.
public void
WriteWarning​(string message, object[] args)
Writes a warning event log by using the provided string argument, current UTC time and the provided arguments list.
message The log message.
args An object array that contains zero or more objects to format.
public void
WriteError​(string message)
Writes an error event log by using the provided string argument and current UTC time.
message The log message.
public void
WriteError​(string message, object[] args)
Writes an error event log by using the provided string argument, current UTC time and the provided arguments list.
message The log message.
args An object array that contains zero or more objects to format.
public void
WriteCritical​(string message)
Writes a critical event log by using the provided string argument and current UTC time.
message The log message.
public void
WriteCritical​(string message, object[] args)
Writes a critical event log by using the provided string argument, current UTC time and the provided arguments list.
message The log message.
args An object array that contains zero or more objects to format.
public void
Write​(System.​Diagnostics.​Tracing.​EventLevel level, System.​Exception innerException, string message)
Writes an exception log by using the provided event identifer, exception argument, string argument and current UTC time.
level <see cref="T:System.Diagnostics.Tracing.EventLevel" />
innerException <see cref="T:System.Exception" />
message The log message.
public void
Write​(System.​Diagnostics.​Tracing.​EventLevel level, System.​Exception innerException, string message, object[] args)
Writes an exception log by using the provided event identifer, exception argument, string argument, arguments list and current UTC time.
level <see cref="T:System.Diagnostics.Tracing.EventLevel" />
innerException <see cref="T:System.Exception" />
message The log message.
args An object array that contains zero or more objects to format.
public void
Dispose​()
protected void
Dispose​(bool disposing)
protected void
Finalize​()
public string
GetTrait​(string key)
public bool
IsEnabled​()
public string
ToString​()
public void
Write​(string eventName)
public void
Write​(string eventName, System.​Diagnostics.​Tracing.​EventSourceOptions options)
protected void
WriteEvent​(int eventId)
protected void
WriteEvent​(int eventId, byte[] arg1)
protected void
WriteEvent​(int eventId, int arg1)
protected void
WriteEvent​(int eventId, int arg1, int arg2)
protected void
WriteEvent​(int eventId, int arg1, int arg2, int arg3)
protected void
WriteEvent​(int eventId, int arg1, string arg2)
protected void
WriteEvent​(int eventId, long arg1)
protected void
WriteEvent​(int eventId, long arg1, byte[] arg2)
protected void
WriteEvent​(int eventId, long arg1, long arg2)
protected void
WriteEvent​(int eventId, long arg1, long arg2, long arg3)
protected void
WriteEvent​(int eventId, long arg1, string arg2)
protected void
WriteEvent​(int eventId, System.​Diagnostics.​Tracing.​EventSourcePrimitive[] args)
protected void
WriteEvent​(int eventId, object[] args)
protected void
WriteEvent​(int eventId, string arg1)
protected void
WriteEvent​(int eventId, string arg1, int arg2)
protected void
WriteEvent​(int eventId, string arg1, int arg2, int arg3)
protected void
WriteEvent​(int eventId, string arg1, long arg2)
protected void
WriteEvent​(int eventId, string arg1, string arg2)
protected void
WriteEvent​(int eventId, string arg1, string arg2, string arg3)
protected void
WriteEventCore​(int eventId, int eventDataCount, System.​Diagnostics.​Tracing.​EventData* data)
protected void
WriteEventWithRelatedActivityId​(int eventId, System.​Guid relatedActivityId, object[] args)
protected void
WriteEventWithRelatedActivityIdCore​(int eventId, System.​Guid* relatedActivityId, int eventDataCount, System.​Diagnostics.​Tracing.​EventData* data)
public void
Write​(string eventName, System.​Diagnostics.​Tracing.​EventSourceOptions options, T data)
public void
Write​(string eventName, T data)
public bool
Equals​(object obj)
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object