Skip to content

7a7b97f2 4f63 95ff dc72 de4e73e7d33c

Axel Kesseler edited this page Mar 1, 2023 · 6 revisions

CompositeLoggerExtension.AddPersistentLogger(TContext) Method (ICompositeLogger(TContext), ILoggerSettingsSection, String)

Adds a new persistent logger with settings that are read from section parameter but changes the used logging filename if not invalid.

Namespace: Plexdata.LogWriter.Extensions
Assembly: Plexdata.LogWriter.Composite (in Plexdata.LogWriter.Composite.dll) Version: 1.0.7.1

Syntax

C#

public static ICompositeLogger<TContext> AddPersistentLogger<TContext>(
	this ICompositeLogger<TContext> parent,
	ILoggerSettingsSection section,
	string filename
)

Parameters

 

parent
Type: Plexdata.LogWriter.Abstraction.ICompositeLogger(TContext)
The composite logger to add the persistent logger to.
section
Type: Plexdata.LogWriter.Abstraction.ILoggerSettingsSection
The configuration section to get all persistent logger settings from.
filename
Type: System.String
The fully qualified logging filename.

Type Parameters

 

TContext
The type of the logger context.

Return Value

Type: ICompositeLogger(TContext)
The provided composite logger.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICompositeLogger(TContext). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method adds a new persistent logger using the section parameter to determine the settings from.

See Also

Reference

CompositeLoggerExtension Class
AddPersistentLogger Overload
Plexdata.LogWriter.Extensions Namespace

Clone this wiki locally