Giter Club home page Giter Club logo

Comments (4)

HannesWell avatar HannesWell commented on June 28, 2024

Good question.
If you just want to trace the SCR, maybe this helps:
https://github.com/apache/felix-dev/tree/master/scr#configuration

from equinox.

laeubi avatar laeubi commented on June 28, 2024

If you just want to trace the SCR, maybe this helps

This will require each and every component to provide custom properties, that's not really useful.

e.g. the slf4j simple logger has the following properties: https://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html that would be useful here is well.

from equinox.

tjwatson avatar tjwatson commented on June 28, 2024

External configuration of each LoggerContext can be done through the method org.osgi.service.log.admin.LoggerContext.setLogLevels(Map<String, LogLevel>) which can be obtained from the LoggerAdmin service with the org.osgi.service.log.admin.LoggerAdmin.getLoggerContext(String) method.

There is also Configuration Admin which can be used to configure LoggerContext (see https://docs.osgi.org/specification/osgi.core/8.0.0/service.log.html#d0e54441)

We do have built-in configuration property eclipse.log.level (set through config.ini) that can control the LogLevel of the logger named org.eclipse.equinox.logger. This is the logger that writes to the .log file and is the logger used by other logging APIs in Eclipse that end up forwarding their messages to the OSGi Logger. The value can be set to INFO, WARNING and ERROR, INFO will for example show all log message. I'm open to having a more general property that can somehow be used as a default source for configuring other logger names. Although I would probably not recommend trying to shoehorn that into the existing eclipse.log.level configuration property because that one is awkward and predates the whole OSGi LoggerContext API.

from equinox.

laeubi avatar laeubi commented on June 28, 2024

@tjwatson thanks for the insight, I know this could be done through config admin / logger admin, I'm just more searching for something that is used as defaults if no such configuration exits.

For example I currently investigate if we can include slf4j-osgi but this might produce a lot of log outputs, so people will instantly complain about "logspam", so an easy to use (e.g. adding a property to eclipse.ini) would be good, while telling them to fetch OSGi service and doing something in code will most probably be "to complex" :-)

from equinox.

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.