Log4j.xml and log4jproperties file setup

I’m trying to setup sentry, recently I got an error saying I need to create two files (log4j.xml and log4j.properties) and I dont know how to setup this files.

pom.xml dependencies:

    <dependency>
        <groupId>io.sentry</groupId>
        <artifactId>sentry</artifactId>
        <version>1.7.16</version>
    </dependency>
    <!-- Logger -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
       <version>1.6.5</version>
    </dependency>

Sentry has a guide on how to setup the log4j1.x and log4j2.x integrations.
In those guides you’ll get instructions on what to add to each of those files.

1 Like

Thank you!