Thanks Ingo, that looks cool. I will check it out. I actually noticed the project a while back, but I couldn't find any documentation on how to use it so I started writing my own bundle. Although it seems fairly simple to use (judging by your description), it would be kind of nice to know what options I have with Pax-Confman. You wouldn't happen to have a link to any such documentation, would you?
thanks, Peter On Wed, May 7, 2008 at 7:53 PM, Ingo Meyer <[EMAIL PROTECTED]> wrote: > Hi Peter, > you should use the 'org.ops4j.pax.confman.pax-confman-propsloader' bundle > for loading .properties files into the cm service. > If you use the cm service from equinox, start your bundles in the following > order (for any other cm impl, start it first): > > [EMAIL PROTECTED]:start, > [EMAIL PROTECTED]:start, > [EMAIL PROTECTED]:start, > [EMAIL PROTECTED]:start > > Then make a dir 'configuration' and a sub-dir 'services' wherever you wish. > Inside that you put a file named 'org.ops4j.pax.logging.properties' with > the log4j content, e.g.: > > =============== > # Root Logger > log4j.rootLogger=ALL, STOUT, FILE > > # STOUT > log4j.appender.STOUT=org.apache.log4j.ConsoleAppender > log4j.appender.STOUT.layout=org.apache.log4j.PatternLayout > log4j.appender.STOUT.layout.ConversionPattern=%5p%F - %m%n > > # FILE > log4j.appender.FILE=org.apache.log4j.RollingFileAppender > log4j.appender.FILE.File=/logs/mylog.txt > log4j.appender.FILE.Threshold=ALL > > log4j.appender.FILE.MaxFileSize=5000KB > #log4j.appender.FILE.MaxBackupIndex=1 > log4j.appender.FILE.layout=org.apache.log4j.PatternLayout > log4j.appender.FILE.layout.ConversionPattern=%5p [%d] %C %M() - %m%n > ================ > > To give this directory to the propsloader use the application parameter > '-Dbundles.configuration.location=/<path-to-your-dir>/configuration > > With that it should work and there is no need for an own bundle ;-) > > HTH > > Ingo > > > Am 07.05.2008 um 15:34 schrieb Peter Gardfjäll: > > Hi all, > > according to the Pax-Logging documentation, the logger can be set up by > passing the contents of a log4j.properties via the ConfigurationAdmin > service. > However, I have not been able to find any code examples of how to perform > this. > Are there any samples available that shows how to accomplish this, or would > someone be willing to respond with a brief code example? > It would be greatly appreciated. > > Thanks, Peter > _______________________________________________ > general mailing list > general@lists.ops4j.org > http://lists.ops4j.org/mailman/listinfo/general > > > > _______________________________________________ > general mailing list > general@lists.ops4j.org > http://lists.ops4j.org/mailman/listinfo/general > >
_______________________________________________ general mailing list general@lists.ops4j.org http://lists.ops4j.org/mailman/listinfo/general