Click or drag to resize

LoggerCreatorDelegate Delegate

Defines the LoggerCreator function used to return custom logger implementations.

Namespace:  Neon.Diagnostics
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.10.0
Syntax
public delegate INeonLogger LoggerCreatorDelegate(
	LogManager logManager,
	string module,
	TextWriter writer,
	string contextId,
	Func<bool> isLogEnabledFunc
)

Parameters

logManager
Type: Neon.DiagnosticsLogManager
The parent log manager.
module
Type: SystemString
The case sensitive logger event source module (defaults to null).
writer
Type: System.IOTextWriter
Optionally specifies a target TextWriter. This can be useful for redirecting the ourput of a text logger to a file or somewhere else. This parameter may be ignored for non-text based loggers or for other logger specific reasons.
contextId
Type: SystemString
Optionally specifies additional information that can be used to identify context for logged events. For example, the Neon.Cadence client uses this to record the ID of the workflow recording events.
isLogEnabledFunc
Type: SystemFuncBoolean
Optionally specifies a function that will be called at runtime to determine whether to actually log an event. This defaults to null which will always log events.

Return Value

Type: INeonLogger
The INeonLogger instance.
See Also