CruGlobal/red-egg — pull request #9 by mattdrees (2014-09-02 22:21:31+00:00)
Title: Fix log loop

DSS recently had a problem with creating way too many errbit error reports.

I believe at least part of the problem was red egg's fault. When the primary notifier fails, the fallback notifier logs the error using log4j. However, this gets caught by red egg's log4j appender, which notices the error and triggers another notification. Thus, an infinite loop is created (well, not infinite; it stops whenever Errbit comes back online and the primary notifier succeeds in reporting the error. One such example is [here](https://errors.uscm.org/apps/5265791fe694aa499b00b640/problems/53fe4c8f8b3b81618b000023)).

I'm not sure why I haven't seen similar behavior from SSW and WSAPI. For some reason, they don't seem to get caught in an infinite loop.

This PR prevents the infinite loop.

It also clarifies how to disable Errbit reporting (at least, for non-cdi apps. I'll eventually add something for CDI apps). This was prompted by another (secondary) problem with DSS: Ryan tried to disable notifications by commenting out the API key. It's actually better to comment out the setErrbitConfig() call.