do this properly

This commit is contained in:
JohnCorby 2023-02-28 19:45:35 -08:00
parent 8f7b351d79
commit 385ebd543e

View File

@ -16,19 +16,20 @@ public static class DebugLog
public static void ToConsole(string message, MessageType type = MessageType.Message)
{
if (QSBCore.Helper == null)
{
// yes i know this is only meant for OWML, but it's useful as a backup
ModConsole.OwmlConsole.WriteLine(message, type, GetCallingType());
return;
}
if (QSBCore.DebugSettings.InstanceIdInLogs)
{
message = $"[{ProcessInstanceId}] " + message;
}
QSBCore.Helper.Console.WriteLine(message, type, GetCallingType());
if (QSBCore.Helper == null)
{
// yes i know this is only meant for OWML, but it's useful as a backup
ModConsole.OwmlConsole.WriteLine(message, type, GetCallingType());
}
else
{
QSBCore.Helper.Console.WriteLine(message, type, GetCallingType());
}
}
public static void ToHud(string message)
@ -50,13 +51,6 @@ public static class DebugLog
public static void DebugWrite(string message, MessageType type = MessageType.Message)
{
if (QSBCore.Helper == null)
{
// yes i know this is only meant for OWML, but it's useful as a backup
ModConsole.OwmlConsole.WriteLine(message, type, GetCallingType());
return;
}
if (QSBCore.DebugSettings.DebugMode)
{
ToConsole(message, type);