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)
File details
Details for the file logentries-envs-0.0.5.tar.gz
.
File metadata
- Download URL: logentries-envs-0.0.5.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461e246159ccbc6f4fbab84231d39118dc1c6a4d281e7b38bb923a728af7ca34 |
|
MD5 | 9d91eafde7a5b0df2b8b089572ba04ed |
|
BLAKE2b-256 | 02db5bf83bbaa4c80cc3ba7ace2a3be1c83cffdb609dadf9189711a02bd90e52 |