Hi,

Karaf main module use java.util.logging.Logger for logging (as pax-logging is started after).

The BootstrapLogManager started by the Main loads the org.ops4j.pax.logging.cfg file:

String log4jConfigPath = System.getProperty("karaf.etc") + "/org.ops4j.pax.logging.cfg";
        BootstrapLogManager.setProperties(config.props, log4jConfigPath);

So adding a logger in org.ops4j.pax.logging.cfg should work:

log4j.logger.org.apache.karaf.main=ERROR

Did you try this ?

Regards
JB

On 05/06/2015 04:09 PM, sditlinger wrote:
Using ServiceMix 5.4/Karaf 2.4.1/Cellar 2.3.4

I have 3 nodes in cluster - 2 slaves are in standby for failover.  These two
nodes are constantly logging "locking" from
org.apache.karaf.main.SimpleFileLock at the INFO level.  The log files build
up at the rate of over 1 GB per day.

It seems that in the "starting" state, the slave nodes are logging based on
some default configuration, because changes to the org.ops4j.pax.logging.cfg
file (e.g. set Root level to WARN, disable "out" logger) have no effect.
Also the log files are not "rolling" as specified in the PAX configuration -
it's all going into one file which cannot be deleted without shutting down
node.

System.properties file sets a default level of ERROR, so that's not it.

The slave nodes in question are both child instances (i.e. created from
"admin:create" at the master karaf node's shell prompt.

As it is, I have to shut everything down every few days just to clean out
log files.

Can this problem be fixed through some other configuration change?  Or is it
a bug?

Thanks,
Steve



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Loggin-in-cluster-can-t-be-configured-tp4040207.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to