Skip to main content

Logmongo: Log messages to a capped MongoDB collections

Project description


pip install logmongo easy_install logmongo

What does it do?

  • Gracefully creates capped collections.
  • Auto expires oldest records first and solves log rotation.
  • Writes complex (dicts and kwargs) log records.
  • Logs asynchronously.
  • Collects logs locally or remotely or in a central location.
  • Allows access to logs via MongoDB queries and APIs.

Why should I use Logmongo instead of just pymongo?

Logmongo subclasses the pymongo Collection object and provides the following additions -

A new Logmongo object will:
  • gracefully create a named capped collection
  • allow a max size to be specified
write method which:
  • logs all passed keywords
  • adds current time to record
  • adds hostname to record
query method which:
  • allows keywords (kwargs) querying example: log.query( tags=’finance’ )
tail method which:
  • prints all records that match query until killed

How does it work?


from logmongo import Logmongo

log = Logmongo()

log.write( message='No required kwargs or fields!' )

entry = {
log.write( entry )

# for more help check out
help( logmongo )


Public Domain

How do I thank you?

Write me an email! I always respond back!

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
logmongo-0.1.0-py2.7.egg (4.5 kB) Copy SHA256 hash SHA256 Egg 2.7 Jun 27, 2013
logmongo-0.1.0.tar.gz (3.0 kB) Copy SHA256 hash SHA256 Source None Jun 27, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page