forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArchiSteamFarmLogManager.cs
45 lines (38 loc) · 1.07 KB
/
ArchiSteamFarmLogManager.cs
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
34
35
36
37
38
39
40
41
42
43
44
45
// https://github.com/NLog/NLog/blob/v4.7.10/src/NLog/LogManager.cs
using NLog;
using NLog.Config;
using System;
namespace ArchiSteamFarm
{
public static class LogManager
{
static readonly LogFactory factory = new();
[CLSCompliant(false)]
public static Logger GetLogger(string name)
{
return factory.GetLogger(name);
}
public static void Flush()
{
factory.Flush();
}
public static void ReconfigExistingLoggers()
{
factory.ReconfigExistingLoggers();
}
public static LoggingConfiguration Configuration
{
get => factory.Configuration;
set => factory.Configuration = value;
}
public static event EventHandler<LoggingConfigurationChangedEventArgs> ConfigurationChanged
{
add => factory.ConfigurationChanged += value;
remove => factory.ConfigurationChanged -= value;
}
public static void Shutdown()
{
factory.Shutdown();
}
}
}