ConsoleFormatter.Write<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 the log message to the specified TextWriter.
public:
generic <typename TState>
abstract void Write(Microsoft::Extensions::Logging::Abstractions::LogEntry<TState> ^ logEntry, Microsoft::Extensions::Logging::IExternalScopeProvider ^ scopeProvider, System::IO::TextWriter ^ textWriter);
public abstract void Write<TState> (in Microsoft.Extensions.Logging.Abstractions.LogEntry<TState> logEntry, Microsoft.Extensions.Logging.IExternalScopeProvider? scopeProvider, System.IO.TextWriter textWriter);
abstract member Write : LogEntry * Microsoft.Extensions.Logging.IExternalScopeProvider * System.IO.TextWriter -> unit
Public MustOverride Sub Write(Of TState) (logEntry As LogEntry(Of TState), scopeProvider As IExternalScopeProvider, textWriter As TextWriter)
Type Parameters
- TState
The type of the object to be written.
Parameters
- logEntry
- LogEntry<TState>
The log entry.
- scopeProvider
- IExternalScopeProvider
The provider of scope data.
- textWriter
- TextWriter
The string writer embedding ansi code for colors.
Remarks
If the formatter wants to write colors to the console, it can do so by embedding ANSI color codes into the string.
Applies to
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.