|
Logging interface (2nd run) IMPLEMENTED - Informations on this page might be out of sync with actual implementation This is more than just a RFC - right now, everything is done and prepared, sit back,relax and enjoy the flight into the future of logging (-; # this is the default, its the well known Helma logger # extended to fit the logging interface loggerFactory = helma.util.LoggerFactory # log4J for Helma / the Apache Commons Logging interface loggerFactory=org.apache.commons.logging.impl.LogFactoryImpl ...As you can see, Apache Commons Logging already offers some implementations for it's interface - e.g. to use log4J - and there is of course an implementation for the default helma logger, as we know it. Lets first sum up what changes for the default behaviour of logging before going into detail.
helma.server helma.appName.event helma.appName.access helma.appName.userDefinedhelma.appName.userDefined would be the name of the logger Helma uses for logging events that where triggered using
app.log("my message", "userDefined");
within the scrippting envoirement.There is something that still has to be done: The Apache Commons Logging interface requires (as almost any other logging system does) to log events using priorities / levels. So far everything coming from the scripting envoirement is logged with priority INFO, all logging events within Helma have been rewritten to use the logging level they need. Logging within the scripting envoirement should be extended like this to use the possibilites of the new logging interface: # log level INFO, kept for backwards compatibility app.log(message); app.trace(message); app.trace(message, exception); app.debug(message); app.debug(message, exception); app.info(message); app.info(message, exception); app.warn(message); app.warn(message, exception); app.error(message); app.error(message, exception); app.fatal(message); app.fatal(message, exception);Basically, thats it. So right now as you can't wait anymore to try the new logging possibilites, i'll tell you what you have to do to actually use them. Get yourself an up-to-date checkout of Helma 1.2.6 from the CVS repository (yeah, its only implemented for 1.2.6 yet for practical reasons, but as far as I can see now, it only needs some additional hours to adopt it for 1.3.x too). Then download the changes [HopMacro error in file: java.lang.RuntimeException: Error retrieving Node: java.sql.SQLException: General error message from server: "Can't open file: 'AV_FILE.MYI' (errno: 145)"] to the source, place them in the right directories and compile Helma. Download the jar files needed for Apache Commons Logging (which are commons-logging.jar and commons-logging-api.jar, download them from here: http://apache.netmonic.com/jakarta/commons/logging/binaries/commons-logging-1.0.3.zip ) and place them in your lib/ext directory. You should now have a future logging enabled version of Helma, just start it and you should at least already see the changes to the file names in your log directory. Next step is to combine Helma with a logging system like log4J, read more: http://helma.org/stories/77549 !
... comment
|
navigation
Download
Community
Weblog
Mailing Lists
IRC Channel
Documentation
Introductions
Tools
Reference
Project
Roadmap
Bug Reporting
Source
Wiki
Tags
Updates
Related Projects
search
|
||||