Skip to main content
ddlogs
=======

[![Version](https://img.shields.io/pypi/v/ddlogs.svg)](https://pypi.python.org/pypi/ddlogs)

# Description

Datadog logs logging handler and utilities.

# Requirements

- Python3.6 or higher
- pip

# Installation

## PyPI

```sh
pip install ddlogs
```

# Usage

```python
import logging
import ddlogs

logger = logging.getLogger('test')
h = ddlogs.DatadogLogsHandler(
api_key='your-datadog-api-key', # default: os.environ.get('DD_API_KEY')
source_category='samplecategory', # default: "ddlogs"
source='samplesource', # default: "python"
service='sampleservice', # default: logger.name
host='localhost') # default: gethostname()
h.setFormatter(ddlogs.DictFormatter())
logger.addHandler(h)
logger.error({'foo': 'bar'})
```

# Output
![screenshot](https://raw.githubusercontent.com/marcy-terui/ddlogs/master/images/screenshot.png)

Development
-----------

- Source hosted at [GitHub](https://github.com/marcy-terui/ddlogs)
- Report issues/questions/feature requests on [GitHub
Issues](https://github.com/marcy-terui/ddlogs/issues)

Pull requests are very welcome! Make sure your patches are well tested.
Ideally create a topic branch for every separate change you make. For
example:

1. Fork the repo
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Authors
-------

Created and maintained by [Masashi Terui](https://github.com/marcy-terui) (<marcy9114@gmail.com>)

License
-------

MIT License (see [LICENSE](https://github.com/marcy-terui/ddlogs/blob/master/LICENSE))

Download files

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

Source Distribution

ddlogs-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

ddlogs-0.2.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ddlogs-0.2.0.tar.gz.

File metadata

  • Download URL: ddlogs-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ddlogs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0636e8845248ac7ba1402946877b18e20ceac15c88162ed9dfec14937a884fff
MD5 193efd3e40b85d3431fdb2e442c26022
BLAKE2b-256 0c23b1d75c11b7ee6690a0e2ef2a5a8d88a68566a62bf8b7de0eaec014ed0ae4

See more details on using hashes here.

File details

Details for the file ddlogs-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ddlogs-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ddlogs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d94014736888beda23e268b18ae0b67ced51474b75fbdcef90432d32648e6a3f
MD5 cb7d2b3123f583d9adfade9b3fba1523
BLAKE2b-256 bc04afecb4bffbe182146ef313347ff51e769c8ecfb283dc6a1cdcde26f8c558

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page