NAME

WeBWorK::Utils::Logs - contains utility subroutines for writing logs to files.

writeLog

Usage: writeLog($ce, $facility, $message)

Write to the log file specified by $facility, where $facility is a key specified in the $webworkFiles{logs} hash from the course environment. A valid WeBWorK::CourseEnvironment object must be specified by $ce. The format of the message written to the log file is

[formatted date & time] $message

writeCourseLog

Usage: writeCourseLog($ce, $facility, $message, $time)

Write to the course log file specified by $facility, where $facility is a key in the $courseFiles{logs} hash from the course environment. A valid $WeBWorK::CourseEnvironment object must be specified in $ce. The $time argument is optional, and the current time will be used if it is not provided. The format of the message written to the log file is

[formatted date & time] $message

writeTimingLogEntry

Usage: writeTimingLogEntry($ce, $route, $details)

Write to the timing log. A valid $WeBWorK::CourseEnvironment object must be specified in $ce. The $route should be the URL path for the current route. The format of the message written to the log file is

[formatted date & time] processID unixTime - $route [$details]

Note that the $details argument should not be wrapped in brackets since that will be done by this method.