Class LoggerTraceListener
This class implements a TraceListener that, when configured, writes trace messages to the injected logger
Implements
Inherited Members
Namespace: Cognite.Extractor.Logging
Assembly: Cognite.Logging.dll
Syntax
public class LoggerTraceListener : TraceListener, IDisposable
Constructors
| Edit this page View SourceLoggerTraceListener(ILogger<LoggerTraceListener>, LoggerConfig)
Creates a new listener using the logger and configuration passed as parameters
Declaration
public LoggerTraceListener(ILogger<LoggerTraceListener> logger, LoggerConfig config)
Parameters
Type | Name | Description |
---|---|---|
ILogger<LoggerTraceListener> | logger | Logger |
LoggerConfig | config | Logger configuration |
Methods
| Edit this page View SourceEnable()
Enable this Trace listener, so that trace messages are outputted by the logger
Declaration
public void Enable()
Write(string?)
Writes a trace message using the configured logger
Declaration
public override void Write(string? message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Trace message |
Overrides
| Edit this page View SourceWriteLine(string?)
Writes a trace message using the configured logger
Declaration
public override void WriteLine(string? message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Trace message |