I have a Java webapp running in a WildFly 10 server. I used to have the following libraries as Maven dependencies:
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
I would now like to use wildfly's builtin logging subsystem.
- Which libraries do I need to add to my project(s)?
- How do I configure the default log-category and root logger declared in standalone.xml to log everything from packages "com.mycompany" at level "debug"?
- I'm running the wildfly server as a plugin in my eclipse. By using the console handler, I want the logs to be written to the console of Eclipse
Currently, it isn't working and I'm not sure which of the 3 steps have I have misconfigured. Here's a snippet from standalone.xml:
...
<logger category="com.company">
<level name="DEBUG"/>
</logger>
<root-logger>
<level name="DEBUG"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
...