Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liferay logging level

Is there a way to set Liferay's global logging level? I am aware of it's console in the Server Administration but I want to set a global level not to a package level.

Thanks!

like image 917
cachiama Avatar asked Feb 07 '13 11:02

cachiama


2 Answers

Because of the way log4j can be configured, any global setting can be overridden by a package level setting.

You can remove any configuration individual packages (if you have any). Then the setting for the rootLogger will take effect.

log4j.rootLogger=INFO, stdout

Update

To override Liferay's default logging settings, you can create a portal-log4j-ext.xml. Just define a logger for the package com.liferay and you should be good to go.

like image 157
adarshr Avatar answered Sep 28 '22 01:09

adarshr


Fixed it by unpacking portal-impl.jar found in $server/applications/liferay-portal/WEB-INF/lib and replacing the contents of META-INF/portal-log4j.xml with my requirements.

like image 23
cachiama Avatar answered Sep 28 '22 01:09

cachiama