mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-11 19:44:44 +00:00
fix: better way to instantiate websocket sink
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user