Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Improved logging for Bottle.

Project Description

Improved logging for Bottle.


In order to catch exceptions from other plugins the LoggingPlugin should be the first plugin you install to the application.

import bottle
from bottle_log import LoggingPlugin

app = bottle.Bottle()

def test(logger):
    logger.warning('This is only a test')
    return {}


The plugin uses the following configuration keys:


The logging level. Possible values: debug, info, warning, error, critical. Defaults to warning.


The logging format. See the python logging documentation for the format. Defaults to “[%(asctime)s] %(levelname)s: %(name)s: %(message)s


If True, the default, time stamps are in UTC.


The standard logger, used by the logger keyword, prints to stderr by default.

Exception logging

This plugin also provides an exception logger (‘bottle.exception’). By default this logger does nothing, since bottle prints all exceptions to stderr, but it can be useful if you want to log exceptions to somewhere else. For example, logging to Logentries:

import bottle
from logentries import LogentriesHandler
from bottle_log import LoggingPlugin

app = bottle.Bottle()
le_handler = LogentriesHandler('logentries-api-token')

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(5.4 kB) Copy SHA256 Hash SHA256
py2.py3 Wheel Apr 11, 2017
(3.6 kB) Copy SHA256 Hash SHA256
Source Apr 11, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting