4

I've ecnountered some problems with logging Liferay 6.0.12 classes on JBoss 5.1.

I need to change log-level for Liferay rss portlet classes, e.g. create another appender or use the default one (server.log) and have logs there with desired debug-level (DEBUG or WARN).

As far as i understand jboss-log4j.xml may override Liferay's configuration, so i tried to modify it. Also I've tried do this from log4j.properties in ROOT.war/WEB-INF/classes, tried creating portal-log4j-ext.xml but none of them worked for me. The only thing i could do - to create another appender, but it was either empty or copy server.log.

Does anybody knows how exactly does it work?

PS Managing log-levels through admin portlet is not acceptable.

Artyom
  • 161
  • 1
  • 10

1 Answers1

1

Fortunately i solved this problem.

  1. First of all, add log4j.jar to ROOT.war/WEB-INF/lib, somehow it's not there.
  2. The second check if there are any log4j.xml in classpath(just search for any in ROOT.war)
  3. If there is any you're able to create log4.xml in ROOT.war/WEB-INF/classes with desired appender and log-levels.
  4. If there is no any you may use either log4j.xml or log4j.properties (for desired appender) and portal-log4j-ext.xml (to override default log-levels) due to Liferay documentation.
Artyom
  • 161
  • 1
  • 10