forked from mxgmn/TextureSynthesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogChecker.cs
43 lines (36 loc) · 792 Bytes
/
LogChecker.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
public class LogChecker
{
public enum Level
{
Disabled = 0,
Important = 1,
Normal = 2,
Verbose = 3
}
public static Level GlobalLevel = Level.Disabled;
public Level CheckerLevel = Level.Disabled;
public LogChecker(Level level)
{
CheckerLevel = level;
}
private bool IsAtLeast(Level level)
{
// global level check
if (level > GlobalLevel)
return false;
// current checker level check
return level <= CheckerLevel;
}
public bool Important()
{
return IsAtLeast(Level.Important);
}
public bool Normal()
{
return IsAtLeast(Level.Normal);
}
public bool Verbose()
{
return IsAtLeast(Level.Verbose);
}
}