Expose Log function to public
MODIFY
WalletWasabi/Logging/BenchmarkLogger.cs
WalletWasabi/Logging/BenchmarkLogger.cs
@@ -63,36 +63,7 @@ namespace WalletWasabi.Logging
message = $"{OperationName} finished in {Stopwatch.ElapsedMilliseconds} milliseconds.";
}
- switch (LogLevel)
- {
- case LogLevel.Trace:
- Logger.LogTrace(message, CallerFilePath, CallerLineNumber);
- break;
-
- case LogLevel.Debug:
- Logger.LogDebug(message, CallerFilePath, CallerLineNumber);
- break;
-
- case LogLevel.Info:
- Logger.LogInfo(message, CallerFilePath, CallerLineNumber);
- break;
-
- case LogLevel.Warning:
- Logger.LogWarning(message, CallerFilePath, CallerLineNumber);
- break;
-
- case LogLevel.Error:
- Logger.LogError(message, CallerFilePath, CallerLineNumber);
- break;
-
- case LogLevel.Critical:
- Logger.LogCritical(message, CallerFilePath, CallerLineNumber);
- break;
-
- default:
- Logger.LogInfo(message, CallerFilePath, CallerLineNumber);
- break;
- }
+ Logger.Log(LogLevel, message, callerFilePath: CallerFilePath, callerLineNumber: CallerLineNumber);
}
_disposedValue = true;

MODIFY
WalletWasabi/Logging/Logger.cs
WalletWasabi/Logging/Logger.cs
@@ -108,7 +108,7 @@ namespace WalletWasabi.Logging
#region GeneralLoggingMethods
- private static void Log(LogLevel level, string message, int additionalEntrySeparators = 0, bool additionalEntrySeparatorsLogFileOnlyMode = true, [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
+ public static void Log(LogLevel level, string message, int additionalEntrySeparators = 0, bool additionalEntrySeparatorsLogFileOnlyMode = true, [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
{
try
{

Expose Log function to public