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 ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.