public static void Log(API.LogType verbosity, string value) { #pragma warning disable 0162 #if DEBUG Console.WriteLine(value); return; #endif API.Log(Plugin.Rainmeter, verbosity, value); #pragma warning restore 0162 }
internal async void Log(API.LogType type, String message) { if (ParentMeasures.Contains(this) && ParentRainmeterApis.Contains(Rainmeter)) { try { await Task.Run(() => Rainmeter.Log(type, message)); //Rainmeter.Log(API.LogType.Debug, message); } catch { DebugLevel += 0; // breakpoint } } }
#pragma warning disable CS1998 // This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. internal async void Log(API.LogType type, String message) #pragma warning restore CS1998 // This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. { if (MqttClientMeasure.ParentMeasures.Contains(ParentMeasure) && MqttClientMeasure.ParentRainmeterApis.Contains(Rainmeter)) { try { // await Task.Run(() => Rainmeter.Log(type, message)); // Rainmeter.Log(API.LogType.Debug, message); } catch { ParentMeasure.DebugLevel += 0; // breakpoint } } }
private void Logger(API.LogType log_type, string message) { API.Log(log_type, "[" + rainmeterAPI.GetMeasureName() + "] " + message); }
public static void Log(API.LogType verbosity, string format, params object[] arg0) { API.Log(verbosity, String.Format(format, arg0)); }
public static void Log(API.LogType verbosity, string value) { API.Log(verbosity, value); }
private void Log(API.LogType type, string format, params object[] args) { _log?.Invoke(type, format, args); }
protected void Log(API.LogType type, string message) { API.Log(type, $"{SkinName}:{Name}: {message}"); }