You may want to use the log4j-1.2-api bridge. To do this
- exclude dependency towards log4j 1.x (mind the different groupid, which has changed between 1.x and 2.x)
<dependencies>
<dependency>
<groupId>org.mobicents.servlet.sip</groupId>
<artifactId>sip-servlets-spec</artifactId>
<exclusions>
<exclusion>
<groupId>log4j</groupId><artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
- add dependency towards log4j 2.17.1, with the bridge
<dependency><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-api</artifactId><version>2.17.1</version></dependency>
<dependency><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-1.2-api</artifactId><version>2.17.1</version></dependency>
<dependency><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-core</artifactId><version>2.17.1</version></dependency>