Logger<T>.ILogger.Log<TState> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Writes a log entry.
generic <typename TState>
virtual void Microsoft.Extensions.Logging.ILogger.Log(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter) = Microsoft::Extensions::Logging::ILogger::Log;
void ILogger.Log<TState> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception exception, Func<TState,Exception,string> formatter);
abstract member Microsoft.Extensions.Logging.ILogger.Log : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
override this.Microsoft.Extensions.Logging.ILogger.Log : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
Sub Log(Of TState) (logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String)) Implements ILogger.Log
Type Parameters
- TState
The type of the object to be written.
Parameters
- logLevel
- LogLevel
Entry will be written on this level.
- eventId
- EventId
Id of the event.
- state
- TState
The entry to be written. Can be also an object.
- exception
- Exception
The exception related to this entry.
Function to create a String message of the state
and exception
.
Implements
Applies to
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.