Git Product home page Git Product logo

Comments (5)

ppkarwasz avatar ppkarwasz commented on May 18, 2024 1

@HannesWell,

Sure, PRs are welcome. We use maven-bundle-plugin to generate the OSGI manifest.

from logging-log4j2.

HannesWell avatar HannesWell commented on May 18, 2024 1

By the way guys, just out of curiosity, how come this situation works for my library with logcaptor using slf4j v2 and latest version of log4j-to-slf4j, but not working for the OSGi world?

Because non OSGi applications usually don't care about the OSGi metadata. But the OSGi metadata said that log4j-to-slf4j required slf4j in version [1.7,2). Therefore an OSGi runtime refused to resolve the log4j.to-slf4j if only slf4j 2.0.x is available.

from logging-log4j2.

Hakky54 avatar Hakky54 commented on May 18, 2024

Nevermind, I had a dependency management issue with dependencies having different versions. There is no issue, so I am closing it.

from logging-log4j2.

HannesWell avatar HannesWell commented on May 18, 2024

In the OSGi world it is currently indeed impossible to use log4j-to-slf4j in conjunction with slf4j-2 because the Manifest only imports the slf4j packages only up until, but excluding 2:

Import-Package:
 [...]
 org.slf4j;version="[1.7,2)",
 org.slf4j.spi;version="[1.7,2)"

If log4j-to-slf4j works well with slf4j 1 and 2 I suggest to widen the package import range to "[1.7,3)".
If the log4j maintainers are interested I can provide a corresponding PR.

from logging-log4j2.

Hakky54 avatar Hakky54 commented on May 18, 2024

By the way guys, just out of curiosity, how come this situation works for my library with logcaptor using slf4j v2 and latest version of log4j-to-slf4j, but not working for the OSGi world?

from logging-log4j2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.