Liferay logging level

橙三吉。 提交于 2019-12-04 23:43:20

问题


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!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/14749976/liferay-logging-level

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!