CESNET/perun — pull request #221 by zlamalp (2014-03-29 15:27:58+00:00)
Title: CORE, RPC: added path to log4j configuration to web.xml

CORE:

- Removed log4j.properties from perun-core module.

This will cause tests runned from your IDE not to log.
You can of course add sample log4j configuration to
src/test/resources which will be used instead.

Tests runned by maven log based on pom.xml configuration
of log4j, which by default is do not log anything.

Not sure, how this will affect other apps including perun-core as lib.
If they do not specify own log4j configuration, they will probably
don't log anything. But you can start any java app with
"-Dlog4j.configuration="path"" property to point to existing external
configuration.

RPC:

- Added Log4jConfigListener definition to web.xml, which must be
first listener in this file so logging is enabled before spring
initialize itself.

- Added path to external log4j configuration file (log4j.xml is
expected filename instead of log4j.properties).
Absolute path to file can be set by maven on build by perun.conf
property (which by default is "/etc/perunv3").
Filtering is set in maven war plugin for web.xml file, since
its located in webapp folder and not resources folder.

Existing log4j.properties files can be easily converted to xml format
using this online tool: http://log4j-props2xml.appspot.com/

Please convert your log4j config files before using this commit !!

Also if you find out, that perun is still not logging after this change,
you might need to modify tomcat settings:

In Tomcat 7 <7.0.43 you will need to change catalina.properties
and remove "log4j*.jar" from the jarsToSkip property.