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 7999165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:25:27+00:00 2026-06-04T15:25:27+00:00

I have a project a-conf with src/main/resources/logback/conf/a/CommonAppenders.xml file: <included> <appender name=FILE class=FileAppender /> </included>

  • 0

I have a project a-conf with src/main/resources/logback/conf/a/CommonAppenders.xml file:

<included>
    <appender name="FILE" class="FileAppender" />
</included>

Also i have another project a-runable with logback.xml config which imports CommonAppenders.xml:

<configuration>
    <!-- this is classpath import -->
    <include resource="logback/conf/a/CommonAppenders.xml" />
    ...
</configuration>

I can compile a-runable in standalone jar with all dependencies (a-conf is one of them) included or as an OSGi bundle. When i run standalone app everything is ok – log files appears as specified in CommonAppenders.xml. But when i run OSGi container no log files are created. I think logback just cannot include resource from classpath because every bundle in OSGi container has its own classloaders (logback uses ClassLoader.getResource() to include file).

I’ve checked Export-Package: logback.conf.a in a-conf.jar/META-INF/MANIFEST.MF (this is done by maven bundlor plug-in) – it is ok. Added Import-Package: logback.conf.a to a-runable with no effect.

I have no ideas what can i do (no code to change, just configs). Any help would be welcome.

P.S. I’ve found similar problem here, but logback.xml is already in classpath and its own appenders works fine. Also i do not have any FileNotFoundExceptions in existing logs.

  • 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-06-04T15:25:29+00:00Added an answer on June 4, 2026 at 3:25 pm

    By default, I believe Logback’s startup errors are simply dropped if you don’t configure a listener (but I may be remembering wrong). The key is likely that a-conf needs to be a Fragment of the bundle that contains logback.jar. That’s what I’ve done for my bundle that has some homebrew appenders.

    If you want to see a setup where Logback is pre-configured to output its startup errors to the OSGi container, take a look at Pax-Logger 1.7 – https://github.com/ops4j/org.ops4j.pax.logging/tree/master/pax-logging-logback

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

Sidebar

Related Questions

I have a config file stuff.conf in an open source project I'm working on.
I have a directory structure for my project as <some_path>/code/project/ /conf /data /src/ a/x.py
I have a Grails project that is using Hibernate XML. The Hibernate file are
I have a project created in Eclipse that has roughly this structure: src conf
I have a spring project name: SpringExample‬ the Directory Structure: the locale.xml for the
I have project asp.net with namespace test and I'm using resources (files Resource.resx and
I have the following code in the urls.py in mysite project. /mysite/urls.py from django.conf.urls.defaults
Applications built on top of the NetBeans platform have a <myappdir>/etc/<myapp>.conf file determining, among
I have a project whose root url conf content is : from django.conf.urls import
I have a makefile that compiles every .c file in my project. For each

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.