Liferay logging level
Asked Answered
A

2

6

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!

Acosta answered 7/2, 2013 at 11:26 Comment(0)
A
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.

Acosta answered 7/2, 2013 at 15:41 Comment(0)
M
4

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.

Muskellunge answered 7/2, 2013 at 11:39 Comment(4)
I agree, do you know a way to remove the declarations of each package in liferay? I can't configure each of the 237 different packages. ThanksAcosta
I am using glassfish and can't find where to put the file for it to work. Tried also this link but it's not resolved: liferay.com/community/forums/-/message_boards/message/14793695Acosta
Looks like it doesn't work in Glassfish. I'm afraid you maybe out of luck. If you use Enterprise version of Liferay, I suggest you raise a ticket.Muskellunge
When I change portal-log4j-ext.xml does it need a liferat restart? If so; is there a workaround to that requirement? I can't get my logs to show.Hophead
A
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.

Acosta answered 7/2, 2013 at 15:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.