Version 0.1
A very serious, industrial web framework in Tcl
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions
tanzer::logger Class Reference

Public Member Functions

 constructor opts
 write dest line
 log request response
 err error

Constructor & Destructor Documentation

tanzer::logger::constructor   opts  

Create a new logger. The following configuration options may be specified in $opts as a list of key-value pairs:

  • accessLog

    The path to a file to record incoming requests to. If this is not specified, then incoming requests will be logged to standard output.

  • errorLog

    The path to a file to record internal server errors to. If this is not specified, then internal server errors will be logged to standard output.

  • logStackTraces

    A boolean value, defaulting to 1, indicating whether or not to log stack traces when handling error logs.

Member Function Documentation


Close all log files held by the current logger object.

tanzer::logger::err   error  

Record the specified $error to the error log, appending any stack traces if logStackTraces is set to 1.

tanzer::logger::log   request response  

Record the incoming $request and its $response to the access log.


Open all log files specified at logger construction time. If the log files are already opened, then they will be closed and reopened. This may be a useful thing if log files are rotated and need to be recreated.

tanzer::logger::write   dest line  

Write $line to the logging destination $dest (one of accessLog or errorLog), immediately flushing the output to disk.

The documentation for this class was generated from the following file: