Skip to main content

Logentries Handler to get Token from environment variable.

Project description

About

The Logentries Python Handler does not provide a way to get TOKEN from a environment variable. This is a simple project that gives you the ability to have Logentries Token read from a Environment variable.

Install

To install this library, use the following command:

pip install logentries-envs

Usage

Considering the following code on file cool_log.py

#!/usr/bin/env python

import logging
from leenvs import LogentriesHandler


log = logging.getLogger('logentries')
log.setLevel(logging.INFO)
test = LogentriesHandler()

log.addHandler(test)

log.warn("Warning message")
log.info("Info message")

sleep(10)

Now, just set the envvar and you are good to go.

$ export LOGENTRIES_TOKEN="1234-1234-1234-1234"
$ python cool_log.py

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

logentries-envs-0.0.5.tar.gz (1.7 kB view details)

Uploaded Source

File details

Details for the file logentries-envs-0.0.5.tar.gz.

File metadata

File hashes

Hashes for logentries-envs-0.0.5.tar.gz
Algorithm Hash digest
SHA256 461e246159ccbc6f4fbab84231d39118dc1c6a4d281e7b38bb923a728af7ca34
MD5 9d91eafde7a5b0df2b8b089572ba04ed
BLAKE2b-256 02db5bf83bbaa4c80cc3ba7ace2a3be1c83cffdb609dadf9189711a02bd90e52

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