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

  • Home
  • SEARCH
  • 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 8889749

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:20:17+00:00 2026-06-14T22:20:17+00:00

Im using Logback to log from an integration framework. All integration’s runs from within

  • 0

Im using Logback to log from an integration framework. All integration’s runs from within the same Java VM, and uses one logback.xml for configuration. They are all in separate packages, and I have set it up so they all log to their own file using a rolling file appender (just using a simple class=”x.y.z” etc). This is working fine.

However, all of the integration’s reference another jar file, which is a shared library. I can setup an appender for classes within this shared library, but having the logs go to yet another file makes tracing extremely difficult. For example the first log will appear in integration_one.txt, the next in shared_lib.txt, and the next back in integration_one.txt.

I need to configure logback so the shared library logs end up in the same file as the integration that called it.

The only way I can think of doing it would involve logging all logs from a thread that starts in package x to file y but I don’t know of a configuration that would accomplish this.

Does anybody have any ideas?

  • 0 0 Answers
  • 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-06-14T22:20:19+00:00Added an answer on June 14, 2026 at 10:20 pm

    Unfortunately, Logback just doesn’t work that way.

    The classes in the jar file undoubtably initialize their own appenders, and typically use their fully qualified class name to do so.

    The part of the configuration that controls the file to which logs are appended uses that fully qualified class name to direct the log entries to the appropriate file.

    In short, a class can have its logs directed to one or more appenders, but I’m not aware of any way, with third-party code, to have the same class log to different appenders depending on some external factor.

    If you had written the classes in the jar file, then you could potentially pass them a logger to use based on the context, but I’m guessing that you don’t have the source code or don’t want to modify it.

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

Sidebar

Related Questions

I want to log pretty printed XML using Logback/SLF4J. Right now, what I get
I am using http://logback.qos.ch/ I am running my java process with a parameter for
So, I am using Slf4jEventHandler and logback-classic. How do I configure the log levels
I have added seperate loggers for all my classes in logback.xml and i am
I'm developing a web application using Logback as logging framework, and am testing it
We are using SLF4J/Logback combination to perform our logging. One of the requirement we
I try to log the solr output with logback. Using maven I build a
I'm using logback (with slf4j) to do the logging, and I've got many XML
I have this appender in my logback.xml <appender name=FILE class=ch.qos.logback.core.rolling.RollingFileAppender> <File>logFile.log</File> <rollingPolicy class=ch.qos.logback.core.rolling.TimeBasedRollingPolicy> <FileNamePattern>logFile.%d{yyyy-MM-dd}.log</FileNamePattern>
I have a red5 application using java language and I use logback for logging.

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.