Apache Felix just recently released a new feature (bundle) which sets up OSGi Log Service and new Loggers using Logback backend. Logback can then be used to manage all the log levels and appenders which can go to console if you wish.
You can get a feel for what this does and how it works here . Note that the Felix logback has integration tests for: - JBoss Logging 3.3.x - Commons Logging 1.2 - JUL (Java Util Logging) - Log4j 1 - Log4j 2 - Slf4j and obviously the OSGi Log Service. I also plan to add this to enroute (which already uses a partial logback solution which handles most other logging APIs.)  http://felix.apache.org/documentation/subprojects/apache-felix-logback.html On Wed, Jul 11, 2018 at 8:20 AM, Łukasz Dywicki via osgi-dev < firstname.lastname@example.org> wrote: > Karaf and pax logging does all what is possible in order to hide a > LogService existence from its consumers. It’s not the best way to get > logging right under OSGi, but definitely its a simplest one. All you need > to do is just use slf4j as you used before. Under the hood pax provides > slf4j package which delegates all calls to its binding. > > That’s why you won’t see a slf4j bundle when you list bundles under Karaf > - its packages (among few other for commons and jul) are provided via > pax-logging. One of ways to get logs printed to console without even a > console appender is via log:tail command available in shell. Under the hood > it uses a list to keep last N-th log entries received by pax. > > Cheers, > Lukasz > > > On 11 Jul 2018, at 04:40, Paul F Fraser via osgi-dev < > email@example.com> wrote: > > > > Somewhere in an Eclipsecon video or some other source I came across some > info on the new logging setup which I cannot find now. It might have been > David and Carsten, but not sure. > > > > The spec will be most valuable once I understand what is going on! > > > > Anyway, to the point, is there an approach which has a console output > like slf4j.simple. If so, how? > > > > The only references I have found so far uses either Karaf and/or pax > logging. > > > > Mike Francis asked for suggestions for examples and I think logging > would be a good one. It is generally overlooked in most presentations. > > > > Paul Fraser > > > > > > _______________________________________________ > > OSGi Developer Mail List > > firstname.lastname@example.org > > https://mail.osgi.org/mailman/listinfo/osgi-dev > > _______________________________________________ > OSGi Developer Mail List > email@example.com > https://mail.osgi.org/mailman/listinfo/osgi-dev > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay) Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________ OSGi Developer Mail List firstname.lastname@example.org https://mail.osgi.org/mailman/listinfo/osgi-dev