mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
fix: enable internal logging for the websocket at the trace level
This commit is contained in:
parent
0efddcf5ab
commit
650fa3aab0
2 changed files with 43 additions and 5 deletions
|
|
@ -252,7 +252,7 @@ namespace PepperDash.Essentials
|
|||
return _wsClient2.IsAlive && IsAuthorized;
|
||||
});
|
||||
|
||||
Debug.SetFileMinimumDebugLevel(Serilog.Events.LogEventLevel.Debug);
|
||||
Debug.SetFileMinimumDebugLevel(Serilog.Events.LogEventLevel.Verbose);
|
||||
}
|
||||
|
||||
private void SetupDefaultRoomMessengers()
|
||||
|
|
@ -1338,13 +1338,38 @@ namespace PepperDash.Essentials
|
|||
Log =
|
||||
{
|
||||
Output = (data, s) =>
|
||||
this.LogDebug(
|
||||
"Message from websocket: {message}",
|
||||
data
|
||||
)
|
||||
{
|
||||
switch (data.Level)
|
||||
{
|
||||
case LogLevel.Trace:
|
||||
this.LogVerbose(data.Message);
|
||||
break;
|
||||
case LogLevel.Debug:
|
||||
this.LogDebug(data.Message);
|
||||
break;
|
||||
case LogLevel.Info:
|
||||
this.LogInformation(data.Message);
|
||||
break;
|
||||
case LogLevel.Warn:
|
||||
this.LogWarning(data.Message);
|
||||
break;
|
||||
case LogLevel.Error:
|
||||
this.LogError(data.Message);
|
||||
break;
|
||||
case LogLevel.Fatal:
|
||||
this.LogFatal(data.Message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// if Essentials is running on a server, set the log level to the lowest level to get the most detail in the logs
|
||||
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Server)
|
||||
{
|
||||
_wsClient2.Log.Level = LogLevel.Trace;
|
||||
}
|
||||
|
||||
_wsClient2.SslConfiguration.EnabledSslProtocols =
|
||||
System.Security.Authentication.SslProtocols.Tls11
|
||||
| System.Security.Authentication.SslProtocols.Tls12;
|
||||
|
|
|
|||
|
|
@ -200,6 +200,19 @@ namespace PepperDash.Essentials.Touchpanel
|
|||
this.csSubnetMask = System.Net.IPAddress.Parse(csSubnetMask);
|
||||
this.csIpAddress = System.Net.IPAddress.Parse(csIpAddress);
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
Debug.LogInformation("This processor does not have a CS LAN", this);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
Debug.LogInformation("This processor does not have a CS LAN", this);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Unexpected exception when checking CS LAN: {ex}", this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the theme setting for this touchpanel controller and persists the change to configuration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue