Skip to main content

Logmongo: Log messages to a capped MongoDB collections

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

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!

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

logmongo-0.0.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logmongo-0.0.3-py2.7.egg (4.5 kB view details)

Uploaded Egg

File details

Details for the file logmongo-0.0.3.tar.gz.

File metadata

  • Download URL: logmongo-0.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for logmongo-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bde0b905161fe02f9f29fc1eed6113e1a25c7a332e9a7cc282a290316716bf0e
MD5 6daf0a275fb3aeb20c153ea18ba54c06
BLAKE2b-256 bc09e784c1d1593940272d4fde6f7876a882d52dc1d2da24f9e8883f1791cc0c

See more details on using hashes here.

File details

Details for the file logmongo-0.0.3-py2.7.egg.

File metadata

  • Download URL: logmongo-0.0.3-py2.7.egg
  • Upload date:
  • Size: 4.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for logmongo-0.0.3-py2.7.egg
Algorithm Hash digest
SHA256 589e7c9ac4ceb17a5d3f9273a1a187040e5a4e8945dd809d0c8937cd093bfe9b
MD5 79aec4af11da138079f3d85ef6e3371b
BLAKE2b-256 6b8949ac7f7d99dddb183197f31c19f87467c991d5be9401601fe8b3216bd4c6

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