Re: Wrapped exceptions
Volkan Yazıcı <[email protected]> Thu, 4 Apr 2024 22:03:24 +0200
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <CABDM8gCj75z1wkEeyFnfZCYv0+s8O0LJS1UFimVt4oXByjn3Pw@mail.gmail.com> |
You should be able to describe this logic in your scripting language of preference using a ScriptFilter <https://logging.apache.org/log4j/2.x/manual/filters.html#Script> in your Log4j configuration file. On Thu, Apr 4, 2024 at 5:27 PM Robert Egan <[email protected]> wrote: > I am currently working with an application that wraps every exception in a > general exception. The problem is, there are some errors I can address > (configuration errors, user errors, etc) and some I cannot address (network > errors, database errors, etc). But they are all wrapped in the general > exception. > > I would like to ACCEPT only on the wrapped exceptions I can address and > DENY the ones I cannot address. Can this be done simply through the log4j2 > configuration files, or will I need to create a custom filter? > > Robert Egan >