Skip to main content

Easy way to integrate Rollbar into daiquiri

Project description

daiquiri-rollbar

Easy way to integrate Rollbar into daiquiri.

The level of the messages is preserved. So logger.info('smth') will be registered as info in Rollbar. If you configure daiquiri to log messages above a certain level, only those messages will be sent to Rollbar.

Exception should be logged with logger.exception. The stacktrace will then be sent to Rollbar with report_exc_info.

To use it, just add RollbarOutput to the list of daiquiri outputs and use daiquiri normally:

from daiquiri_rollbar import RollbarOutput

rollbar_output = RollbarOutput(access_token='access_token')
daiquiri.setup(
    level=logging.INFO,
    outputs=(rollbar_output,)
)
logger = daiquiri.getLogger(__name__)

logger.info('Test')

By default, log messages will be logged for production. To change the environment, build RollbarOutput like this:

rollbar_output = RollbarOutput(access_token='access_token', environment='development')

Changelog

0.2.0 (2017-08-15)

  • Log messages into rollbar

Project details


Download files

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

Source Distribution

daiquiri-rollbar-0.2.0.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file daiquiri-rollbar-0.2.0.tar.gz.

File metadata

File hashes

Hashes for daiquiri-rollbar-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fd56d7f7191f68f7db5603dab56e3fba821448a1e461360c1c7db167dac3a7df
MD5 2815f7e5bffa5642262edb8dfa228e70
BLAKE2b-256 c43b7237af7e92ab88f6128b1ca0db719bebf0da691925462b61033b4d717145

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page