I think that you can also just rename the log4j.properties file to org.ops4j.pax.logging.cfg. This file will be picked up by the pax-logging bundle.
>________________________________ > From: Chetan Mehrotra <[email protected]> >To: [email protected] >Sent: Sunday, August 19, 2012 9:54 AM >Subject: Re: Question regarding logging facilitys in OSGi environments > >Hi Oliver, > >Looking at other docs about Pax Logging [1] and there source code it >appears that only way to configure the logging level is through Config >Admin. You would need to pass the log4j properties as part of >"org.ops4j.pax.logging" PID. This would then be picked by Pax Logging and >would be used to configure Log4j > >I am not sure about your usage of Felix in Netbean so cannot say how you >would create this config. One example I can provide is based on the Pax >Runner profile [2]. This profile configures couple of bundles and make use >of Felix File Install bundle to install the configuration > >1. Create a folder pax-example >2. Create a folder name config under pax-example >3. Copy the cfg file [3] to config folder >4. Run pax-run.sh at pax-example > $pax-run.sh --args= >https://raw.github.com/gist/3394870/logging-example.txt > >Then it would launch a Felix container and install couple of bundles. The >logging would be configured via cfg file. A log file named logging.log >would created under pax-example/runner directory. > >In your Netbean env you would have to find a similar way to provide config > >Chetan Mehrotra > >[1] http://team.ops4j.org/wiki/display/paxlogging/Configuration >[2] https://gist.github.com/3394870 >[3] https://raw.github.com/gist/3394870/org.ops4j.pax.logging.cfg > > >

