-
Notifications
You must be signed in to change notification settings - Fork 0
/
NLog.cs
79 lines (65 loc) · 1.86 KB
/
NLog.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using Gurock.SmartInspect;
using SmartLogger;
// private static readonly NLog.Logger Logger = NLog.LogManager.GetLogger("application");
namespace NLog
{
public enum LogLevel {
Off,
Trace,
Debug,
Info,
Warn,
Fatal
}
public class Logger : HyperAreaBase
{
public Logger(Session session) : base(session)
{
}
}
//public static class RuleExtensions
//{
// private static SmartLogger.Level LogLevelToLevel(LogLevel level)
// {
// switch (level)
// {
// case LogLevel.Off:
// return SmartLogger.Level.Off;
// case LogLevel.Trace:
// return SmartLogger.Level.Trace;
// case LogLevel.Debug:
// return SmartLogger.Level.Debug;
// case LogLevel.Info:
// return SmartLogger.Level.Info;
// case LogLevel.Warn:
// return SmartLogger.Level.Warn;
// case LogLevel.Fatal:
// return SmartLogger.Level.Fatal;
// }
// return SmartLogger.Level.Standby;
// }
//}
//public class DummyConfiguration
//{
// public Rule FindRuleByName(string name)
// {
// return Configuration.FindRuleByName(name);
// }
//}
public sealed class LogManager
{
public static Logger GetLogger(string logName)
{
return HyperLogger.MakeHyperLog(logName).Logger();
}
public static SmartLogger.Configuration Configuration { get { return HyperLogger.HyperConfiguration(); } }
public static void ReconfigExistingLoggers()
{
HyperLogger.ReapplyRules();
}
public static void Shutdown()
{
}
}
}