One approach I have used successfully is to use slf4j as my primary logging API. I then have slf4j bind to log4j. 3rd party dependencies using other frameworks (like JUL) can be bridged to slf4j.
More Related Contents:
- Configuring Log4j Loggers Programmatically
- Is it worth to use slf4j with log4j2
- Redirect System.out and System.err to slf4j
- How to Create a Custom Appender in log4j2?
- Setting a log file name to include current date in Log4j
- How can I create 2 separate log files with one log4j config file?
- In log4j, does checking isDebugEnabled before logging improve performance?
- log4j configuration via JVM argument(s)?
- How to disable Spring logging DEBUG messages?
- Why not use java.util.logging?
- Log4j: How to configure simplest possible file logging?
- how to make log4j to write to the console as well
- Disabling Log4J Output in Java
- How to send a stacktrace to log4j?
- Disable the log from specific class/jar via logback.xml
- How to delete old logs with log4j2
- How to configure log4j to log different log levels to different files for the same logger
- How to customize log4j2 RollingFileAppender?
- Are there technical reasons to prefer using logback instead of log4j?
- Where do I configure log4j in a JUnit test class?
- How to specify Log4J 2.x config location?
- Configuring RollingFileAppender in log4j
- How to exclude a single Class from a Log4j Logger / Appender?
- Configuring log4j2 and log4j using a single log4j2 xml file
- Log runtime Exceptions in Java using log4j
- How to configure log4j to only keep log files for the last seven days?
- Log4J2 property substitution – default
- How to create different log files for different packages using same log4j logger?
- Log4j2 (2.1) custom plugin not detected by packages attribute
- Log4J: Strategies for creating Logger instances