File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -10,26 +10,26 @@ public class BufferingExceptionlessAppender : BufferingAppenderSkeleton {
10
10
public string ServerUrl { get ; set ; }
11
11
12
12
protected override void SendBuffer ( LoggingEvent [ ] events ) {
13
- foreach ( var e in events ) {
13
+ foreach ( var e in events )
14
14
_client . SubmitFromLogEvent ( e ) ;
15
- }
16
15
}
17
16
18
17
public override void ActivateOptions ( ) {
19
18
base . ActivateOptions ( ) ;
20
- if ( ! String . IsNullOrEmpty ( ApiKey ) || ! String . IsNullOrEmpty ( ServerUrl ) )
21
- _client = new ExceptionlessClient ( config =>
22
- {
23
- if ( ! String . IsNullOrEmpty ( ApiKey ) )
24
- config . ApiKey = ApiKey ;
25
- if ( ! String . IsNullOrEmpty ( ServerUrl ) )
26
- config . ServerUrl = ServerUrl ;
27
- config . UseInMemoryStorage ( ) ;
28
- } ) ;
19
+
20
+ if ( String . IsNullOrEmpty ( ApiKey ) && String . IsNullOrEmpty ( ServerUrl ) )
21
+ return ;
22
+
23
+ _client = new ExceptionlessClient ( config => {
24
+ if ( ! String . IsNullOrEmpty ( ApiKey ) )
25
+ config . ApiKey = ApiKey ;
26
+ if ( ! String . IsNullOrEmpty ( ServerUrl ) )
27
+ config . ServerUrl = ServerUrl ;
28
+ config . UseInMemoryStorage ( ) ;
29
+ } ) ;
29
30
}
30
31
31
- protected override void Append ( LoggingEvent loggingEvent )
32
- {
32
+ protected override void Append ( LoggingEvent loggingEvent ) {
33
33
if ( ! _client . Configuration . IsValid )
34
34
return ;
35
35
You can’t perform that action at this time.
0 commit comments