Skip to content

613a46ee 82d9 c0dd 79b1 6c9e70c183b5

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

CompositeLoggerExtension.AddStreamLogger(TContext) Method (ICompositeLogger(TContext), ILoggerSettingsSection, Stream)

Adds a new stream logger with settings that are read from section parameter but uses provided stream.

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

Syntax

C#

public static ICompositeLogger<TContext> AddStreamLogger<TContext>(
	this ICompositeLogger<TContext> parent,
	ILoggerSettingsSection section,
	Stream stream
)

Parameters

 

parent
Type: Plexdata.LogWriter.Abstraction.ICompositeLogger(TContext)
The composite logger to add the stream logger to.
section
Type: Plexdata.LogWriter.Abstraction.ILoggerSettingsSection
The configuration section to get all stream logger settings from.
stream
Type: System.IO.Stream
The stream to be used.

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 stream logger using the section parameter to determine the settings from.

See Also

Reference

CompositeLoggerExtension Class
AddStreamLogger Overload
Plexdata.LogWriter.Extensions Namespace

Clone this wiki locally