Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b4ffece

Browse filesBrowse files
authored
Merge pull request #320 from nmdias/appsettings-tags
Get DefaultTags from appSettings (#319)
2 parents 1104c47 + 923623c commit b4ffece
Copy full SHA for b4ffece

File tree

2 files changed

+6
-0
lines changed
Filter options

2 files changed

+6
-0
lines changed

‎samples/Exceptionless.SampleMvc/Web.config

Copy file name to clipboardExpand all lines: samples/Exceptionless.SampleMvc/Web.config
+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<appSettings>
44
<add key="Exceptionless:ApiKey" value="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" />
55
<add key="Exceptionless:ServerUrl" value="http://localhost:5200" />
6+
<add key="Exceptionless:DefaultTags" value="Tag1, Tag2" />
67
<add key="webpages:Version" value="3.0.0.0" />
78
<add key="webpages:Enabled" value="false" />
89
<add key="ClientValidationEnabled" value="true" />

‎src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs

Copy file name to clipboardExpand all lines: src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs
+5
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@ public static void ReadFromAppSettings(this ExceptionlessConfiguration config) {
390390
string serverUrl = ConfigurationManager.AppSettings["Exceptionless:ServerUrl"];
391391
if (!String.IsNullOrEmpty(serverUrl))
392392
config.ServerUrl = serverUrl;
393+
394+
string defaultTags = ConfigurationManager.AppSettings["Exceptionless:DefaultTags"];
395+
if (!String.IsNullOrEmpty(defaultTags))
396+
foreach (var tag in defaultTags.SplitAndTrim(',').Where(tag => !String.IsNullOrEmpty(tag)))
397+
config.DefaultTags.Add(tag);
393398
}
394399
#endif
395400

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.