Hey all,
Turbine has a new *excellent* logging system thanks to much work on the part
of Tomasz Zielinski and e-point.
I took his wonderful work and did a fairly large subsystem changes to it in
order to have it use the TR.props file instead of a .xml file for the
configuration. I abstracted this work out into a LoggingConfig interface and
implementation that will allow us in the future to more easily move back to
using a .xml file for the configuration if needed.
So, take note on the changes to the TR.props file. There is quite a few more
configuration options with regards to logging. The current defaults will
work out of the box when used in conjunction with a "newer" >2.0 servlet
engine such as Tomcat...
The benefits of this logging system is that we can plug *any* other logging
system into it. There is a default FileLogger which is essentially our old
code that simply logs to a file as well as a Log4JLogger which can be used
to take advantage of the features available in Log4J, such as logging to
syslogd, rolling log files, etc. This is very cool.
You also get the new feature of being able to define "facilities" which are
essentially targets for logging. Therefore, you can now say:
TR.props:
services.TurbineLoggingService.facilities=myfacility
services.TurbineLoggingService.system.destination.file=/logs/myfavility.log
services.TurbineLoggingService.system.className=org.apache.turbine.services.
logging.FileLogger
services.TurbineLoggingService.system.level=INFO
Code:
Log.info ("myfacility", "this is my message");
Obviously, you can set the configuration to go to other places...however,
the only facilities that will be "configured" at startup are the ones
defined on the facilities= line.
The configuration of the Logging system is a bit complex. So, feel free to
ask questions on the lists if you have specific things you need answered.
You can also always look at the source code. It is pretty easy to figure
out. org.apache.turbine.services.logging.*.
I have tested basic logging and it works perfectly. I haven't tested any of
the more advanced features, however, I have confirmed that the right
settings go into the right places...so it *should* work.
thanks,
-jon
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?: [EMAIL PROTECTED]