mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 03:57:08 +00:00
fix: better way to instantiate websocket sink
This commit is contained in:
parent
2223e09283
commit
7517666614
1 changed files with 2 additions and 1 deletions
|
|
@ -106,12 +106,13 @@ namespace PepperDash.Core
|
|||
{
|
||||
_consoleLoggingLevelSwitch = new LoggingLevelSwitch(initialMinimumLevel: LogEventLevel.Information);
|
||||
_websocketLoggingLevelSwitch = new LoggingLevelSwitch();
|
||||
_websocketSink = new DebugWebsocketSink();
|
||||
|
||||
// Instantiate the root logger
|
||||
_logger = new LoggerConfiguration()
|
||||
//.WriteTo.Logger(lc => lc
|
||||
//.WriteTo.Console(levelSwitch: _consoleLoggingLevelSwitch))
|
||||
.WriteTo.Sink(_websocketSink = new DebugWebsocketSink(), levelSwitch: _websocketLoggingLevelSwitch)
|
||||
.WriteTo.Sink(_websocketSink, levelSwitch: _websocketLoggingLevelSwitch)
|
||||
.WriteTo.File(@"\user\debug\global-log-{Date}.txt"
|
||||
, rollingInterval: RollingInterval.Day
|
||||
, restrictedToMinimumLevel: Serilog.Events.LogEventLevel.Debug)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue