is there a way to configure log4j2 with two root levels?

Workaround that works for me:

    <!-- ERROR events are reported to Sentry. -->
    <Root level="error">
        <AppenderRef ref="Sentry" />

    <!-- INFO events are reported to myLog. -->
    <Logger name="com" level="info">
        <AppenderRef ref="myLog" />
    <Logger name="org" level="info">
        <AppenderRef ref="myLog" />

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top