PowerShellSink constructor
A Serilog sink that formats log events and invokes a callback for PowerShell integration.
public PowerShellSink(Action<LogEvent, string> callback, string outputTemplate = "{Message:lj}")
parameter | description |
---|---|
callback | The callback action invoked with the log event and its formatted message. |
outputTemplate | The output template used for formatting log messages. |
Exceptions
exception | condition |
---|---|
ArgumentNullException | Thrown if callback is null. |
Remarks
Initializes a new instance of the PowerShellSink
class.
This constructor initializes the text formatter and callback action for the sink.
See Also
- class PowerShellSink
- namespace Kestrun.Logging.Sinks