TestFileLogger TestFileLogger Class

Definition

public class TestFileLogger : ILogger
Public Class TestFileLogger
    Inherits ILogger
Inheritance
System.ObjectSystem.Object
TestFileLoggerTestFileLogger

Constructors

TestFileLogger(String) TestFileLogger(String)

protected TestFileLogger(string fileName = "data-test.log")
Protected Sub New(fileName As String = "data-test.log")
Parameters
fileName
System.String System.String

Fields

Factory Factory

public static readonly ILoggerFactory Factory
Public Shared ReadOnly Factory As ILoggerFactory

Instance Instance

public static readonly ILogger Instance
Public Shared ReadOnly Instance As ILogger

Methods

BeginScope(TState) BeginScope(Of TState)(TState)

public IDisposable BeginScope<TState>(TState state)
Public Function BeginScope(Of TState)(state As TState) As IDisposable
Type Parameters
TState
Parameters
state
TState TState
Returns
System.IDisposable System.IDisposable

IsEnabled(LogLevel) IsEnabled(LogLevel)

public bool IsEnabled(LogLevel logLevel)
Public Function IsEnabled(logLevel As LogLevel) As Boolean
Parameters
logLevel
System.LogLevel System.LogLevel
Returns
System.Boolean System.Boolean

Log(LogLevel, EventId, TState, Exception, Func) Log(Of TState)(LogLevel, EventId, TState, Exception, Func(Of TState, Exception, String))

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Public Sub Log(Of TState)(logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))
Type Parameters
TState
Parameters
logLevel
System.LogLevel System.LogLevel
eventId
EventId EventId
state
TState TState
exception
System.Exception System.Exception
formatter
System.Func<TState, System.Exception, System.String> System.Func(Of TState, System.Exception, System.String)