If you look at the documentation for the %ex pattern of the PatternLayout [1] you will see that you can do the exact opposite. You can specify packages that you don’t want to see.
Ralph [1] http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout <http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout> > On Dec 11, 2017, at 12:01 PM, Mikael Ståldal <mi...@apache.org> wrote: > > On 2017-12-02 16:01, Debraj Manna wrote: >> In my stacktrace I only want to have lines starting with let's say com.xyz. >> Is it possible to have something like the solution discussed in this answer >> <https://stackoverflow.com/a/10590950/785523> ? > > As far as I know, it is currently not possible to do this with Log4j. > > Feel free to submit a feature request on JIRA: > https://issues.apache.org/jira/projects/LOG4J2 > > And maybe provide a patch or GitHub PR to implement it: > https://github.com/apache/logging-log4j2/pulls > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > >