Updated
This commit is contained in:
@@ -85,22 +85,22 @@ public static class Logger
|
||||
}
|
||||
}
|
||||
|
||||
public static void Log(string message, ELogType logType = ELogType.INFO, bool writeToConsole = true)
|
||||
public static async Task LogAsync(string message, ELogType logType = ELogType.INFO, bool writeToConsole = true)
|
||||
{
|
||||
if (IsDisabled)
|
||||
return;
|
||||
|
||||
LogManager.Write(message, logType, writeToConsole);
|
||||
await LogManager.WriteAsync(message, logType, writeToConsole).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static void Log(Exception exception, string message = "", bool writeToConsole = true)
|
||||
public static async Task LogAsync(Exception exception, string message = "", bool writeToConsole = true)
|
||||
{
|
||||
if (IsDisabled)
|
||||
return;
|
||||
|
||||
if (ELogType.ERROR <= MaxLogType)
|
||||
{
|
||||
LogManager.Write(exception, message, writeToConsole: writeToConsole);
|
||||
await LogManager.WriteAsync(exception, message, writeToConsole: writeToConsole).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user