Log4j with Camunda

Hi,

I’m trying to confirm that my Camunda app is working above log4j implementation using slf4j facade.
I have noticed that there is no description for log4j implementation in the docs:

Logging | docs.camunda.org

In the start of the application, I can see that slf4j is being used correctly:
16:44:37.959 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using ‘class org.apache.ibatis.logging.slf4j.Slf4jImpl’ adapter.
16:44:37.966 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using ‘class org.apache.ibatis.logging.slf4j.Slf4jImpl’ adapter.

However, I don’t know if my application is using the log4j correctly, I couldn’t find a guide that verify it.

I have added the log4j to the pom.xml:

   <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>

Is there some doc that explains how to use the log4j?

Thanks a lot.

Hi @Oron_Cohen,

you can find this information on the log4j webpage: SLF4J Binding Using Log4j – Log4j 2 SLF4J Binding

Hope this helps, Ingo

@Ingo_Richtsmeier, thanks that’s what I needed!
There is so much information online and I didn’t find some simple guide.

I removed the Logback default logging implementation and now I think I’m using the log4j one.
Do you have maybe an idea how to verify that I am working with log4j?
Except of seeing this line:
[kground-preinit] o.j.logging : Logging Provider: org.jboss.logging.Log4j2LoggerProvider
I don’t have any feedback.

Hi @Oron_Cohen,

first feed back is that you see some logging.

Second way to double check would be change the log formatting template and check the change in the logfiles.

Most of these frameworks offer some configuration files, where and how they should write the output. They may not be required every time as they hopefully provide useful defaults.

Hope this helps, Ingo

I confirmed it with editing the log4j2.xml file.
Thanks @Ingo_Richtsmeier