Child pages
  • PaxLogging inside PDE
Skip to end of metadata
Go to start of metadata

How to configure pax logging (for Eclipse PDE users)

Working solution discovered in experiments.
Any comments will be appreciated.

Get Pax Logging

Get pax-logging-api and pax-logging-service bundles and put in your target platform.

Use Configuration Admin for setting up logging

Install Configuration Admin implementation

  • or from Knopflerfish
    • put - cm_all-2.0.0.jar in your target platform dir

Install and configure propsloader

  • Get propsloader bundle and put in your target platform.
  • check (or set) your working dir for OSGi Framework Run configuration
  • In that directory create subdir configurations and nested factories and services
  • In services dir create file with setting in Log4j properties format, for example:
    log4j.rootLogger=DEBUG, A1
    #default layout:
    #log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
    log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%-30.30t] %-40.40c %x - %m%n
  • set lowest (for example 1) start level for bundle:
    and one higher (for example 2) start level for bundles:
    to make sure that logging is correct set up, before other bundles will log.
  • if you want to change logging settings at runtime, simply change your file and from osgi console update org.ops4j.pax.confman.propsloader bundle.
  • No labels