How to use <gel:log> for Gel script testing via a command shell

Document created by gcubed Champion on Aug 13, 2014
Version 1Show Document
  • View in full screen mode

If you use <gel:out> in your script for debugging you will find yourself reworking them into <gel:log> statements before moving it to your target process.


In order to get your <gel:log> messages to your console screen you just need two things:

  1. Add a property to a file.
  2. Edit the gel.bat file (save a copy to revert to if needed) and add a –D argument pointing to the file:



So in my case, I placed the file inside the lib folder.


So my file looks like this: (I also have a RunGel.log file created for large gel script runs)


### set log levels - for more verbose logging change 'info' to 'debug' ###
### Also add logfile to the root, if need stdout then add stdout appender here###
log4j.rootLogger=info, R

log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n


And the java command in the gel.bat looks like this:


Java -Xms32m -Xmx512m -cp "%CLASSPATH%" -Dniku.home="%NIKU_HOME%" -Dlog4j.configuration="file:\%NIKU_HOME%\lib\" -Dforehead.conf.file="%NIKU_HOME%\bin\gel.forehead" com.werken.forehead.Forehead -installDir "%NIKU_HOME%" %GEL_ARGS%


You should now see all you log messages along with their levels on your console screen.