You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by Srikanth Hugar <sr...@gmail.com> on 2014/07/02 13:01:44 UTC
How to make Pax logging to use the loggback config instead of the
standard log4j properties like syntax
Hi,
This is Srikanth Hugar, I have some services in tomcat and trying to
move to apache karaf.
I have a existing service which uses logback for logging configuration.
I tried to make same configuration in osgi, but could not achieve. Any
please let me know what could be the problem?
org.ops4j.pax.logging.cfg
org.ops4j.pax.logging.logback.config.file=${karaf.home}/etc/logback.xml
logback.xml is available at ${karaf.home}/etc/
--.
Apache Karaf version : 3.0 ,
pax logging 1.7.1 which is packaged with karaf from build.
After above configuration change, my karaf.log contents are :
Jul 02, 2014 4:21:32 PM org.apache.karaf.main.lock.SimpleFileLock lock
.....................................................................
INFO: Lock acquired
Jul 02, 2014 4:21:32 PM org.apache.karaf.main.Main$KarafLockCallback
lockAquired
INFO: Lock acquired. Setting startlevel to 100
Srikanth
www.srikanthugar.in
Re: How to make Pax logging to use the loggback config instead of the
standard log4j properties like syntax
Posted by Achim Nierbeck <bc...@googlemail.com>.
Do you use slf4j or logback directly in your services?
For the later you also need to install the pax-logging-logback bundle.
Otherwise it won't work.
Some more insights can be found at the Pax Logging project [1]
regards, Achim
[1] - https://github.com/ops4j/org.ops4j.pax.logging
2014-07-02 13:01 GMT+02:00 Srikanth Hugar <sr...@gmail.com>:
> Hi,
>
> This is Srikanth Hugar, I have some services in tomcat and trying to
> move to apache karaf.
>
> I have a existing service which uses logback for logging configuration.
>
> I tried to make same configuration in osgi, but could not achieve. Any
> please let me know what could be the problem?
>
> org.ops4j.pax.logging.cfg
> org.ops4j.pax.logging.logback.config.file=${karaf.home}/etc/logback.xml
>
> logback.xml is available at ${karaf.home}/etc/
> --.
>
> Apache Karaf version : 3.0 ,
> pax logging 1.7.1 which is packaged with karaf from build.
>
>
> After above configuration change, my karaf.log contents are :
>
> Jul 02, 2014 4:21:32 PM org.apache.karaf.main.lock.SimpleFileLock lock
> .....................................................................
> INFO: Lock acquired
> Jul 02, 2014 4:21:32 PM org.apache.karaf.main.Main$KarafLockCallback
> lockAquired
> INFO: Lock acquired. Setting startlevel to 100
>
> Srikanth
> www.srikanthugar.in
>
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master