TestingUtils.CreateDefaultLoggerFactory 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.
Overloads
CreateDefaultLoggerFactory(String) |
Create the default logger factory, which would configure logger factory with a FileLoggerProvider that writes logs to |
CreateDefaultLoggerFactory(String, LoggerFilterOptions) |
Create the default logger factory, which would configure logger factory with a FileLoggerProvider that writes logs to |
CreateDefaultLoggerFactory(String)
- Source:
- TestingUtils.cs
Create the default logger factory, which would configure logger factory with a FileLoggerProvider that writes logs to filePath
and console.
by default;
public static Microsoft.Extensions.Logging.ILoggerFactory CreateDefaultLoggerFactory (string filePath);
static member CreateDefaultLoggerFactory : string -> Microsoft.Extensions.Logging.ILoggerFactory
Public Shared Function CreateDefaultLoggerFactory (filePath As String) As ILoggerFactory
Parameters
- filePath
- String
The file path.
Returns
ILoggerFactory.
Applies to
CreateDefaultLoggerFactory(String, LoggerFilterOptions)
- Source:
- TestingUtils.cs
Create the default logger factory, which would configure logger factory with a FileLoggerProvider that writes logs to filePath
and console.
by default;
public static Microsoft.Extensions.Logging.ILoggerFactory CreateDefaultLoggerFactory (string filePath, Microsoft.Extensions.Logging.LoggerFilterOptions filters);
static member CreateDefaultLoggerFactory : string * Microsoft.Extensions.Logging.LoggerFilterOptions -> Microsoft.Extensions.Logging.ILoggerFactory
Public Shared Function CreateDefaultLoggerFactory (filePath As String, filters As LoggerFilterOptions) As ILoggerFactory
Parameters
- filePath
- String
the logger file path
- filters
- LoggerFilterOptions
log filters you want to configure your logging with