Kostas's blog

Develop with Eclipse - Deploy with Maven

In the previous Declarative Services in Apache Karaf entry the creation of a Karaf feature is demonstrated. One can create the feature by simply running `mvn clean install` at the root of the source code (available at GitHub). This will build and install all projects in the local Maven repository.

Logging in Apache Karaf

Apache Karaf provides a powerful logging system based in OPS4j Pax Logging. Besides implementing a standard OSGi Log Service, it also supports all major logging APIs (Apache Commons Logging, SLF4J, Apache Log4j, Java Util Logging). So no matter what API your libraries are using, Karaf can log messages from them.

For new bundles I suppose that a good choice is SLF4J. This is a modern API that offers parameterized log messages. In Java code one usually creates a static logger:
 

Syndicate content

ANIKETOS newsletter

Stay informed on our latest news!

Login

Only for users who has an user and a password sent by the administrator.