Skip to content

Commit

Permalink
Log errors during log message creation to internal log
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 6, 2024
1 parent 0a79f24 commit b24c65a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Elmah.Io.Log4Net/ElmahIoAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ private void EnsureClient()
Timeout = new TimeSpan(0, 0, 5),
UserAgent = UserAgent(),
});
api.Messages.OnMessageFail += (sender, args) =>
{
LogLog.Error(GetType(), args.Error.Message, args.Error);
};
_client = api;
}
}
Expand Down

0 comments on commit b24c65a

Please sign in to comment.