Skip to main content

:rat: Ratlog Python library - Application Logging for Rats, Humans and Machines

Project description

# :rat: Ratlog.py

_Application Logging for Rats, Humans and Machines_

[![Build Status](https://travis-ci.org/alxwrd/ratlog.py.svg?branch=master)](https://travis-ci.org/alxwrd/ratlog.py)

> **Disclaimer:**
_The [Ratlog specification](https://github.com/ratlog/ratlog.github.io) is
still alpha status and might be subject to breaking changes. Beware,
because of that, this API and format might change significantly. We will
try our best to tag a stable release as soon as possible.
[Leave feedback](https://github.com/alxwrd/ratlog.py/issues) and help us
get there faster!_

```python
>>> import ratlog

>>> log = ratlog.Log()

>>> log("hello world")
hello world

# Add fields
>>> log("counting", {"count": 1})
counting | count: 1

# Add fields and tag
>>> log("counting", {"count": -1}, "negative")
[negative] counting | count: -1

# Create another logger bound to a tag
>>> warn = ratlog.Log("warning")
>>> warn("disk space low")
[warning] disk space low

# Adding more tags
>>> crit = ratlog.Log("warning", "critical")
>>> crit("shutting down all servers")
[warning|critical] shutting down all servers
```


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

ratlog-0.1.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

ratlog-0.1.0-py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 3

Supported by

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