You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Src/StackifyLib/Logger.cs
+32-4Lines changed: 32 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,7 @@ namespace StackifyLib
12
12
publicclassLogger
13
13
{
14
14
publicstaticint_MaxLogBufferSize=10000;
15
-
// public static bool AutoSetTransID = false;
16
-
15
+
17
16
privatestaticLogClient_LogClient=null;
18
17
19
18
staticLogger()
@@ -22,11 +21,25 @@ static Logger()
22
21
}
23
22
24
23
25
-
24
+
/// <summary>
25
+
/// Used to override the appname being used by any and all logging appenders. Be it this Logger class, log4net, NLog, etc
26
+
/// </summary>
26
27
publicstaticstringGlobalAppName=null;
28
+
29
+
/// <summary>
30
+
/// Used to override the environment being used by any and all logging appenders. Be it this Logger class, log4net, NLog, etc
31
+
/// </summary>
27
32
publicstaticstringGlobalEnvironment=null;
33
+
34
+
/// <summary>
35
+
/// Used to override the api key being used by any and all logging appenders. Be it this Logger class, log4net, NLog, etc
36
+
/// </summary>
28
37
publicstaticstringGlobalApiKey=null;
29
38
39
+
40
+
/// <summary>
41
+
/// Used to get/set the api key used by this logger class, not appenders like log4net, NLog, etc. Set GlobalApiKey to change it for those
42
+
/// </summary>
30
43
publicstaticstringApiKey
31
44
{
32
45
get
@@ -45,6 +58,9 @@ public static string ApiKey
45
58
}
46
59
}
47
60
61
+
/// <summary>
62
+
/// Global setting for any log appenders for how big the log queue size can be in memory before messages are lost if there are problems uploading or we can't upload fast enough
63
+
/// </summary>
48
64
publicstaticintMaxLogBufferSize
49
65
{
50
66
get{return_MaxLogBufferSize;}
@@ -59,11 +75,19 @@ public static void Shutdown()
59
75
_LogClient.Close();
60
76
}
61
77
78
+
/// <summary>
79
+
/// Gets info about the app
80
+
/// </summary>
81
+
/// <returns></returns>
62
82
publicstaticAppIdentityInfoIdentity()
63
83
{
64
84
return_LogClient.GetIdentity();
65
85
}
66
86
87
+
/// <summary>
88
+
/// Used to check if there have been recent failures or if the queue is backed up and if logs can be sent or not
0 commit comments