sunlabs.brazil.sunlabs
Class LogTemplate
java.lang.Object
sunlabs.brazil.template.Template
sunlabs.brazil.sunlabs.LogTemplate (view source)
- All Implemented Interfaces:
- TemplateInterface
public class LogTemplate
- extends Template
Template for logging to files. This is a skeleton for now,
to be fleshed out as required. It dumps an arbitrary string to a
log file. It is intended primarily for debugging.
<log message="text message" [file="file name" flush=n close=true]>
Appends to the named log file, creating the file if it doesn't already
exist.
Attributes:
- message
- The message to log. a newline is added
- filename
- The name of the file to log to.
File names are relative to the Current directory (not the document
root). Defaults to the template prefix with a "log" as the suffix.
- flush
- How many lines to buffer before flushing the output to disk. The
default is "1".
- close=true
- Close a logger and free up any resources associated with it.
Notes:
Creating too many loggers will run the system out of file descriptors.
Loggers are shared accross all sessions.
Fields inherited from class sunlabs.brazil.template.Template |
debug |
LogTemplate
public LogTemplate()
tag_log
public void tag_log(RewriteContext hr)