Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7537639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:54:22+00:00 2026-05-30T06:54:22+00:00

If a 3rd party dependency logs using a concrete framework (such as log4j), and

  • 0

If a 3rd party dependency logs using a concrete framework (such as log4j), and I want my app to do all logging via slf4j, then is it possible to configure log4j (either in XML, properties file, etc.) to redirect the log messages to the slf4j API? (Which, at runtime, would bind to a concrete slf4j binding of my choice.)

It would just be nice to get all log messages going to the same place through the same API.

I don’t even mind if I have to do something a little crazy, like point log4j.properties to some interim code (that I would write), which in turn directs traffic to slf4j!

I just don’t know where to start. Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:54:23+00:00Added an answer on May 30, 2026 at 6:54 am

    Of course you can and it is thoroughly explained in the documentation:

    log4j-over-slf4j

    SLF4J ship with a module called log4j-over-slf4j. It allows log4j users to migrate existing applications to SLF4J without changing a single line of code but simply by replacing the log4j.jar file with log4j-over-slf4j.jar, as described below.

    It is both hacky and ingenious – you are removing log4j.jar and replacing it with log4j-over-slf4j.jar. The latter JAR mirrors Log4J classes in the same packages, so your application and libraries don’t even have to be recompiled. But the new implementations are simply rerouting to SLF4J.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a 3rd party control that exposes a bunch of dependency properties
When using 3rd party libraries/components in production projects, are you rigorous about using only
I am using a 3rd party API which is defined in 2 DLLs. I
I'm using a 3rd party DLL written in unmanaged C++ that controls some hardware
I'm porting 3rd party software from Linux to Windows using Visual C 2008 Express.
I'm developing application using VC++ 6. I have a 3rd party DLL. This library
I'm using a remote 3rd party storage solution that does not have support for
I have a 3rd party dependency in my project, which refer to its dependencies
So I have this 3rd party java library I am using and in the
I'm using this 3rd party report generating software. It has the following steps: 1)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.