Class FileLoggerExtension
- Namespace
- Invex.Extensions.Logging.File
- Assembly
- Invex.Extensions.Logging.File.dll
Provides extension methods for registering the file logger and creating group routing scopes.
[PublicAPI]
public static class FileLoggerExtension
- Inheritance
-
FileLoggerExtension
- Inherited Members
Methods
BeginGroupScope(ILogger, string?)
Begins a structured scope whose Group property selects a file name suffix from
PerGroupLogName. Disposing the scope restores the outer
group, if any. Empty group names are ignored, leaving an outer group effective.
public static IDisposable? BeginGroupScope(this ILogger logger, string? groupName)
Parameters
loggerILoggerThe logger on which to begin the scope.
groupNamestringThe group name to match against the configured group mappings.
Returns
- IDisposable
The underlying scope token, or null when the logger does not create scopes.
Remarks
This creates a standard logging scope, so other providers that consume scopes can also see its
Group property. The file logger uses the property for routing without rendering it in log lines.
Exceptions
- ArgumentNullException
loggeris null.