Skip to content

Commit

Permalink
Some more cleanup (reduced nesting)
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Apr 2, 2015
1 parent 8475be8 commit 6998b65
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Source/Platforms/Log4net/BufferingExceptionlessAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ public class BufferingExceptionlessAppender : BufferingAppenderSkeleton {
public string ServerUrl { get; set; }

protected override void SendBuffer(LoggingEvent[] events) {
foreach (var e in events) {
foreach (var e in events)
_client.SubmitFromLogEvent(e);
}
}

public override void ActivateOptions() {
base.ActivateOptions();
if (!String.IsNullOrEmpty(ApiKey) || !String.IsNullOrEmpty(ServerUrl))
_client = new ExceptionlessClient(config =>
{
if (!String.IsNullOrEmpty(ApiKey))
config.ApiKey = ApiKey;
if (!String.IsNullOrEmpty(ServerUrl))
config.ServerUrl = ServerUrl;
config.UseInMemoryStorage();
});

if (String.IsNullOrEmpty(ApiKey) && String.IsNullOrEmpty(ServerUrl))
return;

_client = new ExceptionlessClient(config => {
if (!String.IsNullOrEmpty(ApiKey))
config.ApiKey = ApiKey;
if (!String.IsNullOrEmpty(ServerUrl))
config.ServerUrl = ServerUrl;
config.UseInMemoryStorage();
});
}

protected override void Append(LoggingEvent loggingEvent)
{
protected override void Append(LoggingEvent loggingEvent) {
if (!_client.Configuration.IsValid)
return;

Expand Down

0 comments on commit 6998b65

Please sign in to comment.