Skip to main content
Help us improve Python packaging – donate today!

Logmongo: Log messages to a capped MongoDB collections

Project Description

Installation

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?

Example:

from logmongo import Logmongo

log = Logmongo()

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

entry = {
  'tags':['but','we','like','tags'],
  'level':'info'
}
log.write( entry )

# for more help check out
help( logmongo )

License

Public Domain

How do I thank you?

Write me an email! I always respond back!

Release history Release notifications

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.4

This version
History Node

0.0.3

History Node

0.0.1

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.0.3-py2.7.egg (4.5 kB) Copy SHA256 hash SHA256 Egg 2.7 Jul 14, 2012
logmongo-0.0.3.tar.gz (2.9 kB) Copy SHA256 hash SHA256 Source None Jul 14, 2012

Supported by

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