Microsoft.Extensions.Logging.Abstractions
Represents a buffered log record to be written in batch to an .
Instances of this type can be pooled and reused. Implementations of must
not hold onto instance of passed to its method
beyond the invocation of that method.
Gets the time when the log record was first created.
Gets the record's logging severity level.
Gets the record's event ID.
Gets an exception string for this record.
Gets an activity span ID for this record, representing the state of the thread that created the record.
Gets an activity trace ID for this record, representing the state of the thread that created the record.
Gets the ID of the thread that created the log record.
Gets the formatted log message.
Gets the original log message template.
Gets the variable set of name/value pairs associated with the record.
Represents the ability of a logging provider to support buffered logging.
A logging provider implements the interface that gets invoked by the
logging infrastructure whenever it’s time to log a piece of state.
A logging provider may also optionally implement the interface.
The logging infrastructure may type-test the object to determine if
it supports the interface. If it does, that indicates to the
logging infrastructure that the logging provider supports buffering. Whenever log
buffering is enabled, buffered log records may be delivered to the logging provider
in a batch via .
If a logging provider does not support log buffering, then it will always be given
unbuffered log records. If a logging provider does support log buffering, whether its
or implementation is used is
determined by the log producer.
Delivers a batch of buffered log records to a logging provider.
The buffered log records to log.
Once this function returns, the implementation should no longer access the records
or state referenced by these records since the instances may be reused to represent other logs.
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 log level.
Gets the log category.
Gets the log event ID.
Gets the state.
Gets the log exception.
Gets the formatter.
Minimalistic logger that does nothing.
Returns the shared instance of .
Initializes a new instance of the class.
An used to create an instance of
that logs nothing.
Creates a new instance.
Returns the shared instance of .
This returns a instance that 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.
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.
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.
An interface for configuring logging providers.
Gets the where Logging services are configured.
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.
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 that can be later cached to log messages in a performant way.
Creates a delegate that can be invoked to create a log scope.
The named format string.
A delegate that, when invoked, creates a log scope.
Creates a delegate that 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 that, when invoked, creates a log scope.
Creates a delegate that 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 that, when invoked, creates a log scope.
Creates a delegate that 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 that, when invoked, creates a log scope.
Creates a delegate that 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 that, when invoked, creates a log scope.
Creates a delegate that 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 that, when invoked, creates a log scope.
Creates a delegate that 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 that, when invoked, creates a log scope.
Creates a delegate that can be invoked for logging a message.
The .
The event ID.
The named format string.
A delegate that, when invoked, creates a log message.
Creates a delegate that can be invoked for logging a message.
The .
The event ID.
The named format string.
The .
A delegate that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, when invoked, creates a log message.
Creates a delegate that 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 that, 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
that's used to guide the production of a strongly typed logging method.
Initializes a new instance of the class
that's used to guide the production of a strongly typed logging method.
The log event ID.
The log level.
Format string of the log message.
Initializes a new instance of the class
that's used to guide the production of a strongly typed logging method.
The log level.
Format string of the log message.
Initializes a new instance of the class
that's used to guide the production of a strongly typed logging method.
The log level.
Initializes a new instance of the class
that's used to guide the production of a strongly typed logging method.
Format string of the log message.
Gets or sets 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 or sets the logging level for the logging method.
Gets or sets the message text for the logging method.
Gets or sets 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.
Throws an if is null.
The reference type argument to validate as non-null.
The name of the parameter with which corresponds.
Throws either an or an
if the specified string is or whitespace respectively.
String to be checked for or whitespace.
The name of the parameter being checked.
The original value of .
Attribute used to indicate a source generator should create a function for marshalling
arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
This attribute is meaningless if the source generator associated with it is not enabled.
The current built-in source generator only supports C# and only supplies an implementation when
applied to static, partial, non-generic methods.
Initializes a new instance of the .
Name of the library containing the import.
Gets the name of the library containing the import.
Gets or sets the name of the entry point to be called.
Gets or sets how to marshal string arguments to the method.
If this field is set to a value other than ,
must not be specified.
Gets or sets the used to control how string arguments to the method are marshalled.
If this field is specified, must not be specified
or must be set to .
Gets or sets whether the callee sets an error (SetLastError on Windows or errno
on other platforms) before returning from the attributed method.
Specifies how strings should be marshalled for generated p/invokes
Indicates the user is supplying a specific marshaller in .
Use the platform-provided UTF-8 marshaller.
Use the platform-provided UTF-16 marshaller.
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 field or property member 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 field and property members 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.