forked from hunterzonewu/unity-decompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogFilter.cs
More file actions
126 lines (117 loc) · 3.27 KB
/
LogFilter.cs
File metadata and controls
126 lines (117 loc) · 3.27 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Decompiled with JetBrains decompiler
// Type: UnityEngine.Networking.LogFilter
// Assembly: UnityEngine.Networking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 8B34E19C-EF53-416E-AE36-35C45BAFD2DE
// Assembly location: C:\Users\Blake\sandbox\unity\test-project\Library\UnityAssemblies\UnityEngine.Networking.dll
namespace UnityEngine.Networking
{
/// <summary>
/// <para>FilterLog is a utility class that controls the level of logging generated by UNET clients and servers.</para>
/// </summary>
public class LogFilter
{
/// <summary>
/// <para>The current logging level that UNET is running with.</para>
/// </summary>
public static LogFilter.FilterLevel current = LogFilter.FilterLevel.Info;
private static int s_CurrentLogLevel = 2;
internal const int Developer = 0;
/// <summary>
/// <para>Setting LogFilter.currentLogLevel to this will enable verbose debug logging.</para>
/// </summary>
public const int Debug = 1;
/// <summary>
/// <para>Setting LogFilter.currentLogLevel to this will log only info and above messages. This is the default level.</para>
/// </summary>
public const int Info = 2;
/// <summary>
/// <para>Setting LogFilter.currentLogLevel to this will log wanring and above messages.</para>
/// </summary>
public const int Warn = 3;
/// <summary>
/// <para>Setting LogFilter.currentLogLevel to this will error and above messages.</para>
/// </summary>
public const int Error = 4;
public const int Fatal = 5;
/// <summary>
/// <para>The current logging level that UNET is running with.</para>
/// </summary>
public static int currentLogLevel
{
get
{
return LogFilter.s_CurrentLogLevel;
}
set
{
LogFilter.s_CurrentLogLevel = value;
}
}
internal static bool logDev
{
get
{
return LogFilter.s_CurrentLogLevel <= 0;
}
}
/// <summary>
/// <para>Checks if debug logging is enabled.</para>
/// </summary>
public static bool logDebug
{
get
{
return LogFilter.s_CurrentLogLevel <= 1;
}
}
/// <summary>
/// <para>Checks if info level logging is enabled.</para>
/// </summary>
public static bool logInfo
{
get
{
return LogFilter.s_CurrentLogLevel <= 2;
}
}
/// <summary>
/// <para>Checks if wanring level logging is enabled.</para>
/// </summary>
public static bool logWarn
{
get
{
return LogFilter.s_CurrentLogLevel <= 3;
}
}
/// <summary>
/// <para>Checks if error logging is enabled.</para>
/// </summary>
public static bool logError
{
get
{
return LogFilter.s_CurrentLogLevel <= 4;
}
}
public static bool logFatal
{
get
{
return LogFilter.s_CurrentLogLevel <= 5;
}
}
/// <summary>
/// <para>Control how verbose the network log messages are.</para>
/// </summary>
public enum FilterLevel
{
Developer,
Debug,
Info,
Warn,
Error,
Fatal,
}
}
}