-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPluginLog.cs
More file actions
33 lines (22 loc) · 1.21 KB
/
PluginLog.cs
File metadata and controls
33 lines (22 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace Loupedeck.VolumeControlPlugin.Helpers
{
using System;
// A helper class that enables logging from the plugin code.
internal static class PluginLog
{
private static PluginLogFile _pluginLogFile;
public static void Init(PluginLogFile pluginLogFile)
{
pluginLogFile.CheckNullArgument(nameof(pluginLogFile));
PluginLog._pluginLogFile = pluginLogFile;
}
public static void Verbose(String text) => PluginLog._pluginLogFile?.Verbose(text);
public static void Verbose(Exception ex, String text) => PluginLog._pluginLogFile?.Verbose(ex, text);
public static void Info(String text) => PluginLog._pluginLogFile?.Info(text);
public static void Info(Exception ex, String text) => PluginLog._pluginLogFile?.Info(ex, text);
public static void Warning(String text) => PluginLog._pluginLogFile?.Warning(text);
public static void Warning(Exception ex, String text) => PluginLog._pluginLogFile?.Warning(ex, text);
public static void Error(String text) => PluginLog._pluginLogFile?.Error(text);
public static void Error(Exception ex, String text) => PluginLog._pluginLogFile?.Error(ex, text);
}
}