For a basic explanation of logging, see logging.
Sample #1
Say you have a project named Foobar which logs under "foobar.*" namespace. You want to separate your logs by:
- project messages, including DEBUG messages
- error messages (including, but not limited to your project)
- non-debug messages (including, but not limited to your project)
Put the following into your prod.cfg:
[logging]
[[handlers]]
[[[debug_out]]]
class='FileHandler'
formatter='full_content'
args="('foobar-debug.log', 'a+')"
[[[error_out]]]
level='WARN'
class='FileHandler'
formatter='full_content'
args="('foobar-errors.log', 'a+')"
[[[access_out]]]
level='INFO'
class='FileHandler'
formatter='full_content'
args="('foobar-info.log', 'a+')"
[[loggers]]
[[[your_project]]]
level='DEBUG'
qualname='foobar'
handlers=['debug_out']
[[[access]]]
level='INFO'
handlers=['access_out', 'error_out']
You may want to tweak filenames to be absolute.