python
import logbook
file_handler = logbook.FileHandler("app.log")
file_handler.push_application()
console_handler = logbook.StreamHandler()
console_handler.push_application()
log = logbook.Logger("MyApp")
log.debug("This is a debug message.")
log.info("This is an info message.")
log.warn("This is a warning message.")