diff --git a/qtc-net-client-2/ClientModel/Config.cs b/qtc-net-client-2/ClientModel/Config.cs index 0ec71f8..c0bb70a 100644 --- a/qtc-net-client-2/ClientModel/Config.cs +++ b/qtc-net-client-2/ClientModel/Config.cs @@ -15,6 +15,9 @@ namespace qtc_net_client_2.ClientModel [JsonPropertyName("minimizeToTray")] [JsonRequired] public bool MinimizeToTray { get; set; } = true; + [JsonPropertyName("enableDebugLogs")] + [JsonRequired] + public bool EnableDebugLogs { get; set; } = false; [JsonPropertyName("serverUrl")] [JsonRequired] diff --git a/qtc-net-client-2/Forms/Main.cs b/qtc-net-client-2/Forms/Main.cs index 1f2623a..4c2102d 100644 --- a/qtc-net-client-2/Forms/Main.cs +++ b/qtc-net-client-2/Forms/Main.cs @@ -657,7 +657,7 @@ namespace qtc_net_client_2 UserDirectory.Add(user); } - if (System.Diagnostics.Debugger.IsAttached) + if (System.Diagnostics.Debugger.IsAttached || _config.EnableDebugLogs) LoggingService.LogModel(userList.Data); } }); @@ -681,7 +681,7 @@ namespace qtc_net_client_2 lbRooms.Items.Add(room.Name); } RoomList = roomsRes.Data; - if (System.Diagnostics.Debugger.IsAttached) + if (System.Diagnostics.Debugger.IsAttached || _config.EnableDebugLogs) LoggingService.LogModel(roomsRes.Data); } @@ -765,7 +765,7 @@ namespace qtc_net_client_2 } } - if (System.Diagnostics.Debugger.IsAttached) + if (System.Diagnostics.Debugger.IsAttached || _config.EnableDebugLogs) LoggingService.LogModel(contactsRes.Data); } });