Skip to content

Commit 2c8c089

Browse files
author
Todd Lair
committed
Merge branch 'develop'
2 parents bc1ff5b + 3077fbe commit 2c8c089

File tree

13 files changed

+54
-27
lines changed

13 files changed

+54
-27
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ static void StackifyAPILogger_OnLogMessage(string data)
8787
}
8888
```
8989

90+
## Additional Settings
91+
92+
These settings are available to further customize what information is captured and transmitted to Stackify.
93+
94+
```xml
95+
<appSettings>
96+
<add key="Stackify.CaptureErrorHeaders" value="true" />
97+
<add key="Stackify.CaptureServerVariables" value="false" />
98+
<add key="Stackify.CaptureSessionVariables" value="false" />
99+
<add key="Stackify.CaptureErrorCookies" value="false" />
100+
<add key="Stackify.CaptureErrorUserName" value="true" />
101+
<add key="Stackify.CaptureErrorPostdata" value="false" />
102+
</appSettings>
103+
```
104+
90105

91106
## Errors and Logs
92107

Src/NLog.Targets.Stackify/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyCopyright("Copyright © 2015")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
16-
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
16+
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]
1717

1818
// Setting ComVisible to false makes the types in this assembly not visible
1919
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib.AspNetCore/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[assembly: AssemblyCompany("Stackify")]
1010
[assembly: AssemblyProduct("StackifyLib.AspNetCore")]
1111
[assembly: AssemblyTrademark("")]
12-
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
12+
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]
1313

1414
// Setting ComVisible to false makes the types in this assembly not visible
1515
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib.CoreLogger/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[assembly: AssemblyCompany("Stackify")]
1010
[assembly: AssemblyProduct("StackifyLib.CoreLogger")]
1111
[assembly: AssemblyTrademark("")]
12-
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
12+
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]
1313

1414
// Setting ComVisible to false makes the types in this assembly not visible
1515
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib.ELMAH/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyCopyright("Copyright © 2015")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
16-
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
16+
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]
1717

1818
// Setting ComVisible to false makes the types in this assembly not visible
1919
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib.StackifyTraceListener/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[assembly: AssemblyCompany("Stackify")]
1010
[assembly: AssemblyProduct("StackifyLib.StackifyTraceListener")]
1111
[assembly: AssemblyTrademark("")]
12-
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
12+
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]
1313

1414
// Setting ComVisible to false makes the types in this assembly not visible
1515
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib.log4net/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyCopyright("Copyright © 2015")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
16-
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
16+
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]
1717

1818
// Setting ComVisible to false makes the types in this assembly not visible
1919
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib/Config.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public static void LoadSettings()
6262

6363
CaptureErrorCookies = Get("Stackify.CaptureErrorCookies", bool.FalseString).Equals(bool.TrueString, StringComparison.CurrentCultureIgnoreCase);
6464

65+
CaptureErrorUserName = Get("Stackify.CaptureErrorUserName", bool.TrueString).Equals(bool.TrueString, StringComparison.CurrentCultureIgnoreCase);
66+
67+
CaptureErrorPostdata = Get("Stackify.CaptureErrorPostdata", bool.FalseString).Equals(bool.TrueString, StringComparison.CurrentCultureIgnoreCase);
68+
6569
ApiKey = Get("Stackify.ApiKey", ApiKey ?? string.Empty);
6670

6771
AppName = Get("Stackify.AppName", AppName ?? string.Empty);
@@ -183,21 +187,14 @@ public static void LoadSettings()
183187
public static bool CaptureErrorPostdata { get; set; }
184188
public static bool CaptureErrorHeaders { get; set; } = true;
185189
public static bool CaptureErrorCookies { get; set; }
186-
190+
public static bool CaptureErrorUserName { get; set; } = true;
187191
public static string CaptureErrorSessionWhitelist { get; set; }
188-
189192
public static string CaptureErrorHeadersWhitelist { get; set; }
190-
191193
public static string CaptureErrorHeadersBlacklist { get; set; } = "cookie,authorization";
192-
193194
public static string CaptureErrorCookiesWhitelist { get; set; }
194-
195195
public static string CaptureErrorCookiesBlacklist { get; set; } = ".ASPXAUTH";
196-
197196
public static int Ec2InstanceMetadataUpdateThresholdMinutes { get; set; } = 60;
198-
199197
public static bool? IsEc2 { get; set; }
200-
201198
public static bool? ApiLog { get; set; }
202199

203200
public static int LoggingJsonMaxFields { get; set; } = 50;

Src/StackifyLib/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyCopyright("Copyright © 2018-2020")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
16-
[assembly: AssemblyKeyFileAttribute("Netreo.snk")]
16+
//[assembly: AssemblyKeyFile("Netreo.snk")]
1717

1818
// Setting ComVisible to false makes the types in this assembly not visible
1919
// to COM components. If you need to access a type in this assembly from

Src/StackifyLib/StackifyError.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private void Init()
153153
{
154154
WebRequestDetail = new WebRequestDetail(this);
155155

156-
if (HttpContext.Current.User != null && HttpContext.Current.User.Identity != null)
156+
if (Config.CaptureErrorUserName && HttpContext.Current.User != null && HttpContext.Current.User.Identity != null)
157157
{
158158
UserName = HttpContext.Current.User.Identity.Name;
159159
}
@@ -163,7 +163,7 @@ private void Init()
163163
#else
164164
WebRequestDetail = new WebRequestDetail(this);
165165
#endif
166-
166+
167167
//Fire event
168168
OnCaptureDetail?.Invoke(this);
169169

0 commit comments

Comments
 (0)