I got the logging setup, sort of. I borrowed much from the dhis-live log4j.properties file, and then attempted to deal with the velocity stuff. My file is here
http://pastebin.com/3yyS8JcZ which I placed in the DHIS2_HOME directory, and then defined an environment variable to point to this file. DHIS output goes to where it is supposed to go to, but I get this error Oct 28, 2011 1:47:01 PM org.apache.velocity.runtime.log.JdkLogChute log INFO: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration. java.lang.RuntimeException: Error configuring Log4JLogChute : at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:66) at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:44)... which seems to be discussed here.. http://velocity.apache.org/engine/devel/developer-guide.html#usinglog4jwithexistinglogger Thoughts? Regards, Jason On Fri, Oct 28, 2011 at 2:08 PM, Jason Pickering < jason.p.picker...@gmail.com> wrote: > Likely this should be looked into . Here is a pretty typical one. > > http://pastebin.com/cqPGiRT8 > > Also, there is a whole bunch of stuff in the catalina.out which seems to be > related to velocity issues > > INFO: RHS of #set statement is null. Context will not be modified. > /dhis-web-dataentry/sectionForm.vm [line 70, column 1] > INFO: RHS of #set statement is null. Context will not be modified. > /dhis-web-dataentry/sectionForm.vm [line 65, column 1] > INFO: RHS of #set statement is null. Context will not be modified. > /dhis-web-dataentry/sectionForm.vm [line 67, column 1] > INFO: RHS of #set statement is null. Context will not be modified. > /dhis-web-dataentry/sectionForm.vm [line 70, column 1] > INFO: RHS of #set statement is null. Context will not be modified. > /dhis-web-dataentry/sectionForm.vm [line 65, column 1] > INFO: RHS of #set statement is null. Context will not be modified. > /dhis-web-dataentry/sectionForm.vm [line 67, column 1] > > > I think the same issue afflicts the audit.log as well. > > I will see if I can go down the log4j route and come up with something. > > Regards, > Jason > > > > > On Fri, Oct 28, 2011 at 1:58 PM, Bob Jolliffe <bobjolli...@gmail.com>wrote: > >> On 28 October 2011 12:44, Jo Størset <stor...@gmail.com> wrote: >> > Hi Jason, >> > >> > I think the easiest is maybe to tweak the startup script you are running >> to cd into the log directory before starting tomcat. Then velocity.log will >> end up there.. If you use ubuntu packages, you can change the existing cd in >> /etc/init.d/tomcat6 (or the equivalent). Or chmod $CATALINA_BASE, which is >> where it cd-s to out of the box. >> > >> > Generally, it is a bit difficult to fix the log setup to write to files >> other than relatively (since it will vary from place to place), but it >> should be possible to override the default log4j setup with something like >> 'export TOMCAT_OPTS="-Dlog4j.configuration=<your log4j config>"',but it is a >> bit more work to setup... There you could silence velocity logging, route it >> to sysout or identify the file to log to. >> > >> >> Shouldn't we somehow handle the velocity log settings in the default >> log4j configuration? Before silencing, has anybody ever looked at >> what velocity has been trying to say here? I'm a bit curious ... >> >> > Jo >> > >> > >> > Den 28. okt. 2011 kl. 11.52 skrev Jason Pickering: >> > >> >> I am sure this may have been answered before, but I cannot seem to >> find it. I get some annoying messages in my catalina.out file, which I would >> rather not see related to DHIS not being able to write to velocity.log. >> >> >> >> It seems to want to write this in rather random locations, and I am not >> even slightly interested in this log. Is there a way to either configure the >> logging system not to log messages from velocity (there are a bunch), or to >> simply provide a path to a directory which I actually want the logs to go >> to? >> >> >> >> Regards, >> >> Jason >> >> >> >> _______________________________________________ >> >> Mailing list: https://launchpad.net/~dhis2-devs >> >> Post to : dhis2-devs@lists.launchpad.net >> >> Unsubscribe : https://launchpad.net/~dhis2-devs >> >> More help : https://help.launchpad.net/ListHelp >> > >> > >> > _______________________________________________ >> > Mailing list: https://launchpad.net/~dhis2-devs >> > Post to : dhis2-devs@lists.launchpad.net >> > Unsubscribe : https://launchpad.net/~dhis2-devs >> > More help : https://help.launchpad.net/ListHelp >> > >> > >
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp