Skip to content

Commit

Permalink
Some cleanup to the log4net appender.
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Apr 2, 2015
1 parent fc9b3ab commit af30c21
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Source/Platforms/Log4net/ExceptionlessAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ public class ExceptionlessAppender : AppenderSkeleton {
public string ServerUrl { get; set; }

public override void 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) {
Expand Down

0 comments on commit af30c21

Please sign in to comment.