Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Using Log4j 1.2 Bridge with Log4j 2 API
How can I run my application with both Apache Log4j 2 API and Log4j 1.2 API? My program has two parts, one part uses the new Log4j 2 API, but the other part uses the old Log4j 1.2 API.
✍: FYIcenter.com
The Apache Log4j 2 package comes with the Log4j 1.2 Bridge module to allow you run programs that use both Log4j 2 API and Log4j 1.2 API.
When you run your program, you need to include these JAR files in the classpath:
Warning, you should not include log4j-1.2.x.jar in the classpath. Log4j 1.2 API calls will be handled by log4j-1.2-api-2.x.jar.
The picture belows shows you the JAR dependency diagram of your application and Log4j JAR files.
⇒ Trace Logging on Apache Log4j API
⇐ Running Program with Apache Log4j Configuration
2022-12-22, 13220🔥, 2💬
Popular Posts:
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module. JDK 17 Base module compiled class fil...
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...
JDK 17 jdk.localedata.jmod is the JMOD file for JDK 17 Localedata module. JDK 17 Locale Data module ...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
JDK 11 java.compiler.jmod is the JMOD file for JDK 11 Compiler module. JDK 11 Compiler module compil...