I suspect the reason it never came up is because wrapping all your
exceptions in a general exception is considered a poor design. But
sometimes you have to play the hand you're dealt. I think I'll probably go
with a Script filter, as suggested by another respondent.

Robert Egan
--
*VSolvit LLC*, *CMMI (Level 3), ISO 9001, ISO 20000-1, ISO 27001*
*1305 Executive Blvd. Ste. 160 | Chesapeake | VA | 23320*
*(617) 455-1425*
www.vsolvit.com

*VSolvit (We*Solve*it) *is an award winning technology services company
that specializes in the areas of Geographic Information Systems and IT
application development / database integration.

*Cyber-security ~ Cloud Computing ~ GIS ~ Business Intelligence ~ Data
Warehousing.*

*CONFIDENTIALITY NOTICE:* This communication, including attachments, is for
the exclusive use of addressee and may contain proprietary, confidential or
privileged information. If you are not the intended recipient, any use,
copying, disclosure, dissemination or distribution is strictly prohibited.
If you are not the intended recipient, please notify the sender immediately
by return email and delete this communication and destroy all copies.


On Thu, Apr 4, 2024 at 3:01 PM Ralph Goers <ralph.go...@dslextreme.com>
wrote:

> I really have no idea why but this is the first time I have heard someone
> ask for the ability to filter based on the Exception class.
>
> We haven’t implemented a Filter to do this but I would imagine it could
> easily be done. I would imagine it would:
> a) let you specify a list of Exception classes and the Filter Result on a
> match or mismatch.
> b)  allow the Result to be specified if no Exception is in the LogEvent.
>
> Ralph
>
> > On Apr 4, 2024, at 8:20 AM, Robert Egan <robert.e...@vsolvit.com> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>

Reply via email to