Helma logo
helma.org » Home > Stories > app.debug()

app.debug()

Writes data to the event log.

If the "debug" property is set to true in the apps.properties file, this function writes the messageString argument to the event log, ie. either the file appname_event.log in the helma/log directory by default or a custom log file as defined by the optional filenameString argument.

Writing to a file can be overriden by setting the property "logdir" to console in the app.properties file.

Syntax
app.debug(messageString)
app.debug(filenameString, messageString)

Example
File helma/apps/test/app.properties:
debug = true

File helma/apps/test/root/main.hac:
app.debug("This is a message from outer space.");

File helma/log/test_event.log:
[2002/07/11 17:08] This is a message from outer space.


... comment


Page last modified on 2002-07-12 11:16 by hns