File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Exceptionless/Configuration
Platforms/Exceptionless.NLog Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,15 @@ public TimeSpan? UpdateSettingsWhenIdleInterval {
178
178
}
179
179
}
180
180
181
+ /// <summary>
182
+ /// Set the default minimum log level that will be used until settings are loaded from the server.
183
+ /// </summary>
184
+ /// <param name="minLogLevel"></param>
185
+ public void SetDefaultMinLogLevel ( LogLevel minLogLevel ) {
186
+ if ( ! Settings . ContainsKey ( "@@log:*" ) )
187
+ Settings . Add ( "@@log:*" , minLogLevel . ToString ( ) ) ;
188
+ }
189
+
181
190
/// <summary>
182
191
/// Gets or sets a value indicating whether to include private information about the local machine.
183
192
/// </summary>
Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ and viewing your project configuration page.
19
19
-------------------------------------
20
20
21
21
Here is an example NLog.config file that shows how to use the Exceptionless NLog target. The apiKey attribute
22
- is optional and will be picked up from your Exceptionless config section by default.
22
+ is optional and will be picked up from your Exceptionless config section by default. It is recommended to set
23
+ the minLevel on the Exceptionless target to Trace so that you can control log levels in the server side
24
+ client configuration settings. Also, you can call Configuration.SetDefaultMinLogLevel to control the default
25
+ minimum log level that will be used until the client retrieves settings from the server.
23
26
24
27
<nlog>
25
28
<extensions>
@@ -36,7 +39,7 @@ is optional and will be picked up from your Exceptionless config section by defa
36
39
</targets>
37
40
38
41
<rules>
39
- <logger name="*" minlevel="Info " writeTo="exceptionless" />
42
+ <logger name="*" minlevel="Trace " writeTo="exceptionless" />
40
43
</rules>
41
44
</nlog>
42
45
You can’t perform that action at this time.
0 commit comments