gelf formatted logger
Project description
vara pygelf
Description
Python logging module wrapper for
- GELF format
- syslog level
Usage
from vara_pygelf import logger
logger.debug("test")
extra field at log event (note: gelf doesn't allow "id" field)
logger.debug("test", {"project_id": 2567})
logger.debug("test", {"name": "abc"})
Set log threshold:
logger.set_level("INFO")
add/remove extra fields for all log msg
logger.add_fields({"b": "122" })
logger.remove_fields(["b"])
Log Levels
| Level name | Severity value | Logger method |
|---|---|---|
| EMERGENCY | 0 | logger.emerg |
| ALERT | 1 | logger.alert |
| CRITICAL | 2 | logger.crit |
| ERROR | 3 | logger.err |
| WARNING | 4 | logger.warning |
| NOTICE | 5 | logger.notice |
| INFO | 6 | logger.info |
| DEBUG | 7 | logger.debug |
TODO
- Unit tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vara-pygelf-0.0.3.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vara-pygelf-0.0.3.tar.gz.
File metadata
- Download URL: vara-pygelf-0.0.3.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af8844dd105d4bfd7742aecc55c973f304b8a2a8df79b5b9975909b25725f418
|
|
| MD5 |
46e9c3547b7b3931be796b6d8ce81c9a
|
|
| BLAKE2b-256 |
424c56286246a29d3acd352cc34393712f74113e4040e78e398d403d26a761c2
|
File details
Details for the file vara_pygelf-0.0.3-py3-none-any.whl.
File metadata
- Download URL: vara_pygelf-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d771f003227c98479a8a932db966bf98a8c38eef5b2cf0c13fe613b5951d021
|
|
| MD5 |
9d832d29151cbd07779243793c7fec13
|
|
| BLAKE2b-256 |
1071a040fb21f4eaf44ae8c02c05ce64dd2795e395c85b0ef7f34abdafba0d06
|