mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-03 17:38:30 +00:00
make debug log hook a setting
This commit is contained in:
parent
cb00fafa1c
commit
1885ab201d
@ -66,6 +66,8 @@ namespace QSB
|
||||
|
||||
DebugSettings = Helper.Storage.Load<DebugSettings>("debugsettings.json") ?? new DebugSettings();
|
||||
|
||||
if (DebugSettings.HookDebugLogs)
|
||||
{
|
||||
Application.logMessageReceived += (condition, stackTrace, logType) =>
|
||||
DebugLog.DebugWrite($"[Debug] {condition} {stackTrace}", logType switch
|
||||
{
|
||||
@ -76,6 +78,7 @@ namespace QSB
|
||||
LogType.Exception => MessageType.Error,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(logType), logType, null)
|
||||
});
|
||||
}
|
||||
|
||||
InitializeAssemblies();
|
||||
|
||||
|
@ -13,6 +13,9 @@ namespace QSB.Utility
|
||||
[JsonProperty("playerIdInLogs")]
|
||||
public bool PlayerIdInLogs;
|
||||
|
||||
[JsonProperty("hookDebugLogs")]
|
||||
public bool HookDebugLogs;
|
||||
|
||||
[JsonProperty("debugMode")]
|
||||
public bool DebugMode;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
"useKcpTransport": false,
|
||||
"dumpWorldObjects": false,
|
||||
"playerIdInLogs": false,
|
||||
"hookDebugLogs": false,
|
||||
"debugMode": false,
|
||||
"drawGui": false,
|
||||
"drawLines": false,
|
||||
|
Loading…
Reference in New Issue
Block a user