Skip to main content

A Python logging handler for Treasure Data Cloud

Project description

td-loger: logging library for Treasure Data Cloud
=================================================

Setup
-----

Before using this logging handler, td-agent must be properly configured. Please
confirm these settings are in your /etc/td-agent/td-agent.conf.

## built-in TCP input
<source>
type tcp
</source>

# Treasure Data output
# match events whose tag is td.DATABASE.TABLE
<match td.*.*>
type tdlog
apikey YOUR_API_KEY
</match>

Usage
-----

Check out the tests folder for more samples.

import logging
from tdlog import logger

logging.basicConfig(level=logging.INFO)
l = logging.getLogger('td_logger.test')
l.addHandler(logger.TreasureDataHandler())

l.info('Some message')
js = { "semicolon" : ";", "at" : "@" }
l.info(js)

Have fun!

Special Thanks
--------------

- [Joshua Kuntz](https://github.com/j3kuntz) for the original work

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

td-logger-0.4.2.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file td-logger-0.4.2.tar.gz.

File metadata

  • Download URL: td-logger-0.4.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for td-logger-0.4.2.tar.gz
Algorithm Hash digest
SHA256 2a98168d6900b701e99f123138baef80624f2111cb6a2aef73eaac196363c6fc
MD5 9c9bcc47bd451f8c60f1012e934d8ba2
BLAKE2b-256 7ed5e19981355196417fd96277a26377b05684380b5a58fa9bf6dbd7ddf89f2e

See more details on using hashes here.

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