=======
[](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

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))
Metadata
Release files for ddlogs 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ddlogs-0.2.0.tar.gz | 3.3 kB | Without provenance | Details for ddlogs-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ddlogs-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for ddlogs-0.2.0-py3-none-any.whl |
Total release size: 7.3 kB
Release files / ddlogs-0.2.0.tar.gz
| Download URL | ddlogs-0.2.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0636e8845248ac7ba1402946877b18e20ceac15c88162ed9dfec14937a884fff
|
|
BLAKE2b-256 checksum How to use checksums |
0c23b1d75c11b7ee6690a0e2ef2a5a8d88a68566a62bf8b7de0eaec014ed0ae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Release files / ddlogs-0.2.0-py3-none-any.whl
| Download URL | ddlogs-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d94014736888beda23e268b18ae0b67ced51474b75fbdcef90432d32648e6a3f
|
|
BLAKE2b-256 checksum How to use checksums |
bc04afecb4bffbe182146ef313347ff51e769c8ecfb283dc6a1cdcde26f8c558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for ddlogs 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.