FakeLogRecord Constructor
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.
Initializes a new instance of the FakeLogRecord class.
public:
FakeLogRecord(Microsoft::Extensions::Logging::LogLevel level, Microsoft::Extensions::Logging::EventId id, System::Object ^ state, Exception ^ exception, System::String ^ message, System::Collections::Generic::IReadOnlyList<System::Object ^> ^ scopes, System::String ^ category, bool enabled, DateTimeOffset timestamp);
public FakeLogRecord (Microsoft.Extensions.Logging.LogLevel level, Microsoft.Extensions.Logging.EventId id, object? state, Exception? exception, string message, System.Collections.Generic.IReadOnlyList<object?> scopes, string? category, bool enabled, DateTimeOffset timestamp);
new Microsoft.Extensions.Logging.Testing.FakeLogRecord : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * obj * Exception * string * System.Collections.Generic.IReadOnlyList<obj> * string * bool * DateTimeOffset -> Microsoft.Extensions.Logging.Testing.FakeLogRecord
Public Sub New (level As LogLevel, id As EventId, state As Object, exception As Exception, message As String, scopes As IReadOnlyList(Of Object), category As String, enabled As Boolean, timestamp As DateTimeOffset)
Parameters
- level
- LogLevel
The level used when producing the log record.
- id
- EventId
The ID representing the specific log statement.
- state
- Object
The opaque state supplied by the caller when creating the log record.
- exception
- Exception
An optional exception associated with the log record.
- message
- String
The formatted message text for the record.
- scopes
- IReadOnlyList<Object>
List of active scopes active for this log record.
- category
- String
The optional category for this record, which corresponds to the T in ILogger<TCategoryName>.
- enabled
- Boolean
Whether the log level was enabled or not when the Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>) method was called.
- timestamp
- DateTimeOffset
The time at which the log record was created.