Chapter 20. Logging

A useful way of working out what is happening during a request is to write log statements at various points in your code. These log statements can output log messages to multiple places such as the console or a file to help you follow how your code is working.

Tip

If you don't want to know the details of how logging works but are just desperate to log a message to the console from within a controller action, you can do so like this:

log.debug('Your message goes here')

Getting Started with Pylons Logging

Conceptually, it' helpful to think about Pylons applications as having two completely different types of logs:

  • Server logs

  • Application logs

Server logs are generated by the server running the Pylons application and will typically include ...

Get The Definitive Guide to Pylons now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.