-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManualLogSource.cs
More file actions
21 lines (19 loc) · 810 Bytes
/
ManualLogSource.cs
File metadata and controls
21 lines (19 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace CWAPI
{
public class ManualLogSource
{
private BepInEx.Logging.ManualLogSource Logger { get; }
public string Prefix { get; }
internal ManualLogSource(BepInEx.Logging.ManualLogSource logger, string name)
{
Logger = logger;
Prefix = $"[{name}] ";
}
public void LogDebug(object data) => Logger.LogDebug(Prefix + data);
public void LogInfo(object data) => Logger.LogInfo(Prefix + data);
public void LogMessage(object data) => Logger.LogMessage(Prefix + data);
public void LogWarning(object data) => Logger.LogWarning(Prefix + data);
public void LogError(object data) => Logger.LogError(Prefix + data);
public void LogFatal(object data) => Logger.LogFatal(Prefix + data);
}
}