[server] socketPort=80 logToScreen=0
[server] socketPort=80 logToScreen=0 logFile=/mydir/myLog.log
If these options are not enough for you (for instance, you might be running CherryPy on some embedded device with weird logging constraints), you can define your own special function called logMessage, which takes a single argument called message. The default behaviour of this function is to output the message to screen and/or to a file according to the logToScreen and logFile configuration variables.
The following code is an example of how to write your own logMessage function:
def logMessage(message): print "Here is your message:", message CherryClass Root: mask: def index(self): <html><body>Hello</body></html>
Note that the first line def logMessage(message): has to be exactly that !
See About this document... for information on suggesting changes.