This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# py-chillog

Python library for building logging data structure based on [GELF](http://docs.graylog.org/en/2.1/pages/gelf.html)


Installation
============

```shell
$ make install
```


Usage
=====

```python
from chillog.logger import Chillog

logger = Chillog()

# simple log
logger.info("Message")

# log with optional field(s) using kwargs
logger.info("Message", key_one="value_one", key_two="value_two")

# log with optional field(s) using dict
optional_fields = {
"key_one": "value_one",
"key_two": "value_two"
}

logger.info("Message", **optional_fields) # notice `**` sign before `optional_fields` variable

# log with detailed message
logger.info("Message", full_message="More detailed message")
```

By default, this library will read value of environment variable with key `SERVICE_NAME` to fill `service` json field.
This library also read hostname using python native (`socket.gethostname()`).

Service name and hostname can overridden when initialisation Chillog object like example below

```python
from chillog.logger import Chillog

logger = Chillog(service_name="SERVICE_NAME", hostname="HOSTNAME")
```

There are 7 logger you can use:

- ``debug``
- ``info``
- ``notice``
- ``warning``
- ``error``
- ``critical``
- ``alert``

Output log:

```json
{
"version": 1,
"host": "HOSTNAME",
"service": "SERVICE_NAME",
"short_message": "log description",
"full_message": "long log description if any",
"timestamp": 1472009181293,
"level": 1,
"_additional_key": "additional value"
}
```

Running Test
============

```shell
$ make test
```
Release History

Release History

0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
py-chillog-0.1.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Sep 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting