Microsoft.Extensions.Logging.Abstractions
Identifies a logging event. The primary identifier is the "Id" property, with the "Name" property providing a short description of this type of event.
Implicitly creates an EventId from the given .
The to convert to an EventId.
Checks if two specified instances have the same value. They are equal if they have the same Id.
The first .
The second .
if the objects are equal.
Checks if two specified instances have different values.
The first .
The second .
if the objects are not equal.
Initializes an instance of the struct.
The numeric identifier for this event.
The name of this event.
Gets the numeric identifier for this event.
Gets the name of this event.
Indicates whether the current object is equal to another object of the same type. Two events are equal if they have the same id.
An object to compare with this object.
if the current object is equal to the other parameter; otherwise, .
LogValues to enable formatting options supported by .
This also enables using {NamedformatItem} in the format string.
Represents a storage of common scope data.
Executes callback for each currently active scope objects in order of creation.
All callbacks are guaranteed to be called inline from this method.
The callback to be executed for every scope object
The state object to be passed into the callback
The type of state to accept.
Adds scope object to the list
The scope object
The token that removes scope on dispose.
Represents a type used to perform logging.
Aggregates most logging patterns to a single method.
Writes a log entry.
Entry will be written on this level.
Id of the event.
The entry to be written. Can be also an object.
The exception related to this entry.
Function to create a message of the and .
The type of the object to be written.
Checks if the given is enabled.
Level to be checked.
true if enabled.
Begins a logical operation scope.
The identifier for the scope.
The type of the state to begin scope for.
An that ends the logical operation scope on dispose.
Represents a type used to configure the logging system and create instances of from
the registered s.
Creates a new instance.
The category name for messages produced by the logger.
The .
Adds an to the logging system.
The .
Represents a type that can create instances of .
Creates a new instance.
The category name for messages produced by the logger.
The instance of that was created.
A generic interface for logging where the category name is derived from the specified
type name.
Generally used to enable activation of a named from dependency injection.
The type whose name is used for the logger category name.
Represents a that is able to consume external scope information.
Sets external scope information source for logger provider.
The provider of scope data.
Options for and its overloads
Gets or sets the flag to skip IsEnabled check for the logging method.
Holds the information for a single log entry.
Initializes an instance of the LogEntry struct.
The log level.
The category name for the log.
The log event Id.
The state for which log is being written.
The log exception.
The formatter.
Gets the LogLevel
Gets the log category
Gets the log EventId
Gets the TState
Gets the log exception
Gets the formatter
Minimalistic logger that does nothing.
Returns the shared instance of .
An used to create instance of
that logs nothing.
Creates a new instance.
Returns the shared instance of .
This returns a instance which logs nothing.
This method ignores the parameter and does nothing.
Provider for the .
Returns an instance of .
Minimalistic logger that does nothing.
Returns an instance of .
An instance of .
This method ignores the parameters and does nothing.
ILogger extension methods for common scenarios.
Formats and writes a debug log message.
The to write to.
The event id associated with the log.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogDebug(0, exception, "Error while processing request from {Address}", address)
Formats and writes a debug log message.
The to write to.
The event id associated with the log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogDebug(0, "Processing request from {Address}", address)
Formats and writes a debug log message.
The to write to.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogDebug(exception, "Error while processing request from {Address}", address)
Formats and writes a debug log message.
The to write to.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogDebug("Processing request from {Address}", address)
Formats and writes a trace log message.
The to write to.
The event id associated with the log.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogTrace(0, exception, "Error while processing request from {Address}", address)
Formats and writes a trace log message.
The to write to.
The event id associated with the log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogTrace(0, "Processing request from {Address}", address)
Formats and writes a trace log message.
The to write to.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogTrace(exception, "Error while processing request from {Address}", address)
Formats and writes a trace log message.
The to write to.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogTrace("Processing request from {Address}", address)
Formats and writes an informational log message.
The to write to.
The event id associated with the log.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogInformation(0, exception, "Error while processing request from {Address}", address)
Formats and writes an informational log message.
The to write to.
The event id associated with the log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogInformation(0, "Processing request from {Address}", address)
Formats and writes an informational log message.
The to write to.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogInformation(exception, "Error while processing request from {Address}", address)
Formats and writes an informational log message.
The to write to.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogInformation("Processing request from {Address}", address)
Formats and writes a warning log message.
The to write to.
The event id associated with the log.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogWarning(0, exception, "Error while processing request from {Address}", address)
Formats and writes a warning log message.
The to write to.
The event id associated with the log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogWarning(0, "Processing request from {Address}", address)
Formats and writes a warning log message.
The to write to.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogWarning(exception, "Error while processing request from {Address}", address)
Formats and writes a warning log message.
The to write to.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogWarning("Processing request from {Address}", address)
Formats and writes an error log message.
The to write to.
The event id associated with the log.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogError(0, exception, "Error while processing request from {Address}", address)
Formats and writes an error log message.
The to write to.
The event id associated with the log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogError(0, "Processing request from {Address}", address)
Formats and writes an error log message.
The to write to.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogError(exception, "Error while processing request from {Address}", address)
Formats and writes an error log message.
The to write to.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogError("Processing request from {Address}", address)
Formats and writes a critical log message.
The to write to.
The event id associated with the log.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogCritical(0, exception, "Error while processing request from {Address}", address)
Formats and writes a critical log message.
The to write to.
The event id associated with the log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogCritical(0, "Processing request from {Address}", address)
Formats and writes a critical log message.
The to write to.
The exception to log.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogCritical(exception, "Error while processing request from {Address}", address)
Formats and writes a critical log message.
The to write to.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
logger.LogCritical("Processing request from {Address}", address)
Formats and writes a log message at the specified log level.
The to write to.
Entry will be written on this level.
Format string of the log message.
An object array that contains zero or more objects to format.
Formats and writes a log message at the specified log level.
The to write to.
Entry will be written on this level.
The event id associated with the log.
Format string of the log message.
An object array that contains zero or more objects to format.
Formats and writes a log message at the specified log level.
The to write to.
Entry will be written on this level.
The exception to log.
Format string of the log message.
An object array that contains zero or more objects to format.
Formats and writes a log message at the specified log level.
The to write to.
Entry will be written on this level.
The event id associated with the log.
The exception to log.
Format string of the log message.
An object array that contains zero or more objects to format.
Formats the message and creates a scope.
The to create the scope in.
Format string of the log message in message template format. Example: "User {User} logged in from {Address}"
An object array that contains zero or more objects to format.
A disposable scope object. Can be null.
using(logger.BeginScope("Processing request from {Address}", address))
{
}
Default implementation of
Creates a new .
ILoggerFactory extension methods for common scenarios.
Creates a new instance using the full name of the given type.
The factory.
The type.
The that was created.
Creates a new instance using the full name of the given .
The factory.
The type.
The that was created.
Creates delegates which can be later cached to log messages in a performant way.
Creates a delegate which can be invoked to create a log scope.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked to create a log scope.
The type of the first parameter passed to the named format string.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked to create a log scope.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked to create a log scope.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked to create a log scope.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked to create a log scope.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The type of the fifth parameter passed to the named format string.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked to create a log scope.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The type of the fifth parameter passed to the named format string.
The type of the sixth parameter passed to the named format string.
The named format string
A delegate which when invoked creates a log scope.
Creates a delegate which can be invoked for logging a message.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The type of the fifth parameter passed to the named format string.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The type of the fifth parameter passed to the named format string.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The type of the fifth parameter passed to the named format string.
The type of the sixth parameter passed to the named format string.
The
The event id
The named format string
A delegate which when invoked creates a log message.
Creates a delegate which can be invoked for logging a message.
The type of the first parameter passed to the named format string.
The type of the second parameter passed to the named format string.
The type of the third parameter passed to the named format string.
The type of the fourth parameter passed to the named format string.
The type of the fifth parameter passed to the named format string.
The type of the sixth parameter passed to the named format string.
The
The event id
The named format string
The
A delegate which when invoked creates a log message.
Provides information to guide the production of a strongly-typed logging method.
The method this attribute is applied to:
- Must be a partial method.
- Must return void.
- Must not be generic.
- Must have an as one of its parameters.
- Must have a as one of its parameters.
- None of the parameters can be generic.
Initializes a new instance of the class
which is used to guide the production of a strongly-typed logging method.
Initializes a new instance of the class
which is used to guide the production of a strongly-typed logging method.
The log event Id.
The log level.
Format string of the log message.
Gets the logging event id for the logging method.
Gets or sets the logging event name for the logging method.
This will equal the method name if not specified.
Gets the logging level for the logging method.
Gets the message text for the logging method.
Gets the flag to skip IsEnabled check for the logging method.
Delegates to a new instance using the full name of the given type, created by the
provided .
The type.
Creates a new .
The factory.
Defines logging severity levels.
Logs that contain the most detailed messages. These messages may contain sensitive application data.
These messages are disabled by default and should never be enabled in a production environment.
Logs that are used for interactive investigation during development. These logs should primarily contain
information useful for debugging and have no long-term value.
Logs that track the general flow of the application. These logs should have long-term value.
Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise cause the
application execution to stop.
Logs that highlight when the current flow of execution is stopped due to a failure. These should indicate a
failure in the current activity, not an application-wide failure.
Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires
immediate attention.
Not used for writing log messages. Specifies that a logging category should not write any messages.
Formatter to convert the named format items like {NamedformatItem} to format.
Scope provider that does nothing.
Returns a cached instance of .
An empty scope without any logic
Pretty print a type name.
The .
true to print a fully qualified name.
true to include generic parameter names.
true to include generic parameters.
Character to use as a delimiter in nested type names
The pretty printed type name.
Get a pinnable reference to the builder.
Does not ensure there is a null char after
This overload is pattern matched in the C# 7.3+ compiler so you can omit
the explicit method call, and write eg "fixed (char* c = builder)"
Get a pinnable reference to the builder.
Ensures that the builder has a null char after
Returns the underlying storage of the builder.
Returns a span around the contents of the builder.
Ensures that the builder has a null char after
Resize the internal buffer either by doubling current buffer size or
by adding to
whichever is greater.
Number of chars requested beyond current position.
The format string '{0}' does not have the expected number of named parameters. Expected {1} parameter(s) but found {2} parameter(s).
Specifies that null is allowed as an input even if the corresponding type disallows it.
Specifies that null is disallowed as an input even if the corresponding type allows it.
Specifies that an output may be null even if the corresponding type disallows it.
Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.
Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter may be null.
Gets the return value condition.
Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter will not be null.
Gets the return value condition.
Specifies that the output will be non-null if the named parameter is non-null.
Initializes the attribute with the associated parameter name.
The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
Gets the associated parameter name.
Applied to a method that will never return under any circumstance.
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
Initializes the attribute with the specified parameter value.
The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
the associated parameter matches this value.
Gets the condition parameter value.
Specifies that the method or property will ensure that the listed field and property members have not-null values.
Initializes the attribute with a field or property member.
The field or property member that is promised to be not-null.
Initializes the attribute with the list of field and property members.
The list of field and property members that are promised to be not-null.
Gets field or property member names.
Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
Initializes the attribute with the specified return value condition and a field or property member.
The return value condition. If the method returns this value, the associated parameter will not be null.
The field or property member that is promised to be not-null.
Initializes the attribute with the specified return value condition and list of field and property members.
The return value condition. If the method returns this value, the associated parameter will not be null.
The list of field and property members that are promised to be not-null.
Gets the return value condition.
Gets field or property member names.