Menu

Tuesday, March 1, 2016

Setting the Logging Level for a Package in Karaf

I came across this task the other day and was amazed at the lack of simple documentation around it.  Eventually I figured out the steps and wanted to share with others in hopes that you will not have to go searching for this like me.  

There are 2 simple ways to change the logging level for a package in Apache Karaf.  You can of course get more complex with your configurations and log to different files, but these are the simple way to just change logging level for 1 package and its sub-packages. 

1. Inside the console run:
       log:set <level> <package>


2. Inside fuse/etc/org.ops4j.pax.logging.cfg add the following line
       log4j.logger.<package> = <level>


No comments:

Post a Comment