mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-05-06 20:28:22 +00:00
Always set to info
This commit is contained in:
@@ -91,23 +91,10 @@ class SignalRBridge {
|
||||
? `${this.hubUrl}?token=${this.authToken}`
|
||||
: this.hubUrl;
|
||||
|
||||
// Determine SignalR log level based on environment
|
||||
// Warning level suppresses verbose packet-level logging
|
||||
const { getLogLevel, LogLevel: AppLogLevel } = require("../logger");
|
||||
let signalRLogLevel;
|
||||
|
||||
if (getLogLevel() <= AppLogLevel.DEBUG) {
|
||||
// Debug mode: show Info level (connection events without packet details)
|
||||
signalRLogLevel = signalR.LogLevel.Information;
|
||||
} else {
|
||||
// Development/Production: only warnings and errors
|
||||
signalRLogLevel = signalR.LogLevel.Warning;
|
||||
}
|
||||
|
||||
this.connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl(connectionUrl)
|
||||
.withAutomaticReconnect()
|
||||
.configureLogging(new SafeLogger(signalRLogLevel))
|
||||
.configureLogging(new SafeLogger(signalR.LogLevel.Information))
|
||||
.build();
|
||||
|
||||
// Handle reconnection
|
||||
|
||||
Reference in New Issue
Block a user