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.​LogHelper
Assembly: Microsoft.IdentityModel.Logging
Inheritance: object → LogHelper
Helper class for logging.
Methods
public static
System.​ArgumentNullException
LogArgumentNullException​(string argument)
Logs an exception using the event source logger and returns new <see cref="T:System.ArgumentNullException" /> exception.
argument
argument that is null or empty.
Remarks
EventLevel is set to Error.
public static
T
LogException​(string message)
Logs an exception using the event source logger and returns new typed exception.
message
message to log.
Remarks
EventLevel is set to Error.
public static
T
LogArgumentException​(string argumentName,
string message)
Logs an argument exception using the event source logger and returns new typed exception.
argumentName
Identifies the argument whose value generated the ArgumentException.
message
message to log.
Remarks
EventLevel is set to Error.
public static
T
LogException​(string format,
object[] args)
Logs an exception using the event source logger and returns new typed exception.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
Remarks
EventLevel is set to Error.
public static
T
LogArgumentException​(string argumentName,
string format,
object[] args)
Logs an argument exception using the event source logger and returns new typed exception.
argumentName
Identifies the argument whose value generated the ArgumentException.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
Remarks
EventLevel is set to Error.
public static
T
LogException​(System.​Exception innerException,
string message)
Logs an exception using the event source logger and returns new typed exception.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
message
message to log.
Remarks
EventLevel is set to Error.
public static
T
LogArgumentException​(string argumentName,
System.​Exception innerException,
string message)
Logs an argument exception using the event source logger and returns new typed exception.
argumentName
Identifies the argument whose value generated the ArgumentException.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
message
message to log.
Remarks
EventLevel is set to Error.
public static
T
LogException​(System.​Exception innerException,
string format,
object[] args)
Logs an exception using the event source logger and returns new typed exception.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
Remarks
EventLevel is set to Error.
public static
T
LogArgumentException​(string argumentName,
System.​Exception innerException,
string format,
object[] args)
Logs an argument exception using the event source logger and returns new typed exception.
argumentName
Identifies the argument whose value generated the ArgumentException.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
Remarks
EventLevel is set to Error.
public static
T
LogException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
string message)
Logs an exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
message
message to log.
public static
T
LogArgumentException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
string argumentName,
string message)
Logs an argument exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
argumentName
Identifies the argument whose value generated the ArgumentException.
message
message to log.
public static
T
LogException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
string format,
object[] args)
Logs an exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
public static
T
LogArgumentException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
string argumentName,
string format,
object[] args)
Logs an argument exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
argumentName
Identifies the argument whose value generated the ArgumentException.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
public static
T
LogException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
System.​Exception innerException,
string message)
Logs an exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
message
message to log.
public static
T
LogArgumentException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
string argumentName,
System.​Exception innerException,
string message)
Logs an argument exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
argumentName
Identifies the argument whose value generated the ArgumentException.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
message
message to log.
public static
T
LogException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
System.​Exception innerException,
string format,
object[] args)
Logs an exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
public static
T
LogArgumentException​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
string argumentName,
System.​Exception innerException,
string format,
object[] args)
Logs an argument exception using the event source logger and returns new typed exception.
eventLevel
Identifies the level of an event to be logged.
argumentName
Identifies the argument whose value generated the ArgumentException.
innerException
the inner <see cref="T:System.Exception" /> to be added to the outer exception.
format
Format string of the log message.
args
An object array that contains zero or more objects to format.
public static
System.​Exception
LogExceptionMessage​(System.​Exception exception)
Logs an exception using the event source logger.
exception
The exception to log.
public static
System.​Exception
LogExceptionMessage​(System.​Diagnostics.​Tracing.​EventLevel eventLevel,
System.​Exception exception)
Logs an exception using the event source logger.
eventLevel
Identifies the level of an event to be logged.
exception
The exception to log.
public static
void
LogInformation​(string message,
object[] args)
Logs an information event.
message
The log message.
args
An object array that contains zero or more objects to format.
public static
void
LogVerbose​(string message,
object[] args)
Logs a verbose event.
message
The log message.
args
An object array that contains zero or more objects to format.
public static
void
LogWarning​(string message,
object[] args)
Logs a warning event.
message
The log message.
args
An object array that contains zero or more objects to format.
public static
string
FormatInvariant​(string format,
object[] args)
Formats the string using InvariantCulture
Returns Formatted string.
format
Format string.
args
Format arguments.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object