Git Product home page Git Product logo

de.mnl.osgi's Introduction

de.mnl.osgi

Build Status

A collection of miscellaneous OSGi bundles and components.

OSGi Core Utils

Bundle Maven
de.mnl.osgi.coreutils Maven Central

A small bundle with utilities/helpers. Currently, it provides a new kind of service tracker that works around the problem outlined here.

OSGi Logging Bridges/Facades

Bundle Maven
de.mnl.osgi.lf4osgi Maven Central
de.mnl.osgi.slf4j2osgi Maven Central
de.mnl.osgi.log4j2osgi Maven Central
de.mnl.osgi.jul2osgi Maven Central
de.mnl.osgi.jul2osgi.lib Maven Central
de.mnl.osgi.osgi2jul Maven Central

Logging in OSGi seems to be a notorious problem. Libraries—even if they have OSGi bundle headers—avoid dependencies on OSGi and therefore use one of the "standard" logging libraries such as java.util.logging, log4j, SLF4J or commons logging.

When writing dedicated OSGi components, you should use the Log Service, but even with declarative services its usage is a bit cumbersome compared to the ease of use that you get with the logging libraries.

I've searched, but all attempts to solve the problem seemed rather complex to me. So I have written my own set of really simple to use bridging/facade bundles. Contrary to some other "unification attempts", these bridges/facades put OSGi logging in the center. All log events from the "standard" libraries mentioned above are forwarded to the OSGi logging service, and all logging results can be obtained from the OSGi logging service (e.g. displayed in the Apache Felix Web Console).

  • LF for OSGi: A logging facade for OSGi logging. Makes using OSGi logging as simple as using one of the "standard" libraries.

  • SLF4J for OSGi: A SLF4J logging facade for OSGi logging. Built on LF4OSGi's core classes.

  • Log4j to OSGi: Not sure if this is a facade or a bridge. Anyway, forwards calls to the log4j 2 API to OSGi logging. Built on LF4OSGi's core classes.

  • JUL to OSGi: forwards all logging events from java.util.logging to the OSGi log service.

  • OSGi to JUL: invokes JUL compliant handlers for the messages logged with the OSGi log service.

Indexed Maven Repository Plugin for bnd

The Indexed Maven Repository Plugin maintains an index of a subset of one or more maven repositories and provides the information as an OSGi repository for building and resolving.

The plugin has a documentation page of its own.

Other Sub-Projects

See the READMEs in the subdirectories for details.

Usage

The easiest way to include the bundles in your bnd workspace build is to add a BndPomRepository:

-plugin.xx.MnlOSGi: \
    aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
        name=MnlOSGi; \
        readOnly=true; \
        releaseUrls=https://repo.maven.apache.org/maven2/; \
        query='q=g:%22de.mnl.osgi%22'

de.mnl.osgi's People

Contributors

mnlipp avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.