Log Messages

Webware has a logging facility you can use for basic debugging.

If you are running the application server in OneShot mode, output of self.log('Message') calls will appear toward the very bottom of the page if you have the showconsole parameter set to 1 in conf/oneshot.conf. Otherwise, the log messages will appear in the Webware console.

FYI, the logging method is defined in WebKit.Servlet, and this is inherited by HTTPServlet, and then by Page. So, you should have this method available pretty much everywhere, unless it was over-ridden accidentally.

-- EdmundLian - 18 Mar 2002


I'd also recommend Sacha's LoggingKit. It's very well designed and quite flexible.

-- TavisRudd - 18 Mar 2002


More information from BenParker:

The constant AppServer will write to stdout, which could be the console, or you could redirect it to a file, which is what most people do. Then you can "tail -f" the file to monitor the output via the console, and still have a record of it in the file. You could also pipe the output to a logging program instead of just appending straight to a file.

OneShot errors always appear in our apache error logs. Apache runs the CGI process, so error output from the process feeds back into Apache. Standard "print ..." messages appear at the bottom of every OneShot page as long as you have verbose=1 in your OneShot config file; the stdout is captured by the OneShotAdapter I believe ... maybe the OneShotAppServer...

-- EdmundLian - 18 Mar 2002

If this PEP becomes part of the core (which seems likely), this could be the basis for logging: PEP 282

-- IanBicking - 19 Mar 2002