As discussed, there are a few new changes to the logging system to make life better.
Summary : Things work as before. If you use the latest no-dependency jar, and if you take logkit out of the classpath and put in log4j, it will use a simple, file-based log4j logger. If you want a logkit based logger, use that jar in the classpath. Velocity figures it out. In detail : First, there is a new log4j-based logging class called SimpleLog4JLogSystem with does two things 1) Accepts a property "runtime.log.logsystem.log4j.category" which can contain the name of an existing log4j category, so that you can setup an arbitrarily complicated category in your application, and just pass the name to Velocity, and it will use it. 2) if the above isn't present, it will just log to a file specified by "runtime.log", the usual property. To use this as your logger, you need log4j in the classpath of course, and then just set the property runtime.log.logsystem.class to be org.apache.velocity.runtime.log.SimpleLog4JLogSystem Second, the log management system has a slightly modified algorithm for doing things : 1) It will first see if the application has passed in a living object to use as the logger (as before). 2) If that fails, it will get the runtime.log.logsystem.class property, and try every class listed. It will use the first one that it finds. The default value of the property has both the logkit and log4j (simple) loggers, so now if you don't do anything, Velocity will use whichever it finds in the classpath - so if you put in the logkit jar, it uses that, if the log4j jar, it uses log4j. If both, it uses logkit :) (Thanks to Jason for the idea of just using whatever was in the classpath...) If you want to turn off this automatic mode, just specify the one you want via the runtime.log.logsystem.class property. Finally, if it can't find anything that is specified, it turns to one last gasp for air, trying to use a logkit logger, and will blather to stdout and stderr if it cant - at this point, things are so misconfigured, we can't go further... Code is in CVS HEAD. Give it a wack. If all goes well, will document. -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
