NAME

watchlog - View the log of a CGIBurn job.


SYNOPSIS

View the log of a CGIBurn job, optionally using javascript code to keep the Web browser positioned at the end of the log.

watchlog sends the log as it comes in, and depends on the browser to display it as it comes in. This may not work with all browsers.


DESCRIPTION

watchlog recognizes the following CGI parameters:

job
The jobid of the job whose log should be watched.
tail
If this is set to a nonempty string, watchlog will output a bit of javascript that keeps the browser window positioned at the bottom of the log.


TEMPLATES

watchlog uses the template watchlog.tpl as watchlog, Between watchlog/preburn and watchlog/pageend, the log itself is inserted as text; to make it look reasonable, you will almost definitely want to start and end a pre block around this.

All templates
All templates have access to all :const variables from CGIBurn::Conf.

All templates also have access to the following special variables:

JOB_ID
The job ID of the job whose log we are watching.
JOB_STATUSURL
The URL to the status page for the job whose log we are watching.
TOGGLETAIL
What the CGI variable tail is currently not set to. Used to toggle a flag indicating whether or not a piece of javascript code to try to keep the browser positioned at the end of the log should be enabled.
TOGGLETAILWORD
A word describing the state that tailing is currently not set to; either ``Don't'' or an empty string.
JAVASCRIPT
If tailing is enabled, a chunk of javascript to make it work; otherwise, an empty string.
watchlog/pagestart
The first thing displayed.
watchlog/jobtoolbar
A toolbar of options for the current job.
watchlog/prelog
Displayed immediately before the contents of the log.
watchlog/pageend
Last thing displayed. Will not be displayed until the log indicates that the job has finished.


SEE ALSO

jobcontrol, CGIBurn::Job, CGIBurn::CGITools, TEMPLATES, The CGI Perl module, The CGI::Carp Perl module.