I have eliminated it in my own work; however, my concern is that I am dealing with systems that run 24/7, and if an errant developer manages to create a circular exception and then logs it, it will bring the JVM down. Granted, they should be more careful, but I am simply trying to eliminate the logging framework, a low-level framework, from causing an issue. The one saving grace here is that Logback throws an error, and does not simply spin indefinitely which some other frameworks do, a far worse scenario.
On another note, ever since 1.7 and the introduction of suppressed exceptions, the JVM has taken circular exceptions into account with printStackTrace and java.util.logging, masking the circular exceptions. I think they, Oracle, thought it was too easy to create circular exceptions using the suppression mechanism, and took steps to handle the possibility. In my humble opinion, I think Logback should take similar steps.
|