Skip to main content

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
  • Module package?

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

vara-pygelf-0.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vara_pygelf-0.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file vara-pygelf-0.0.2.tar.gz.

File metadata

  • Download URL: vara-pygelf-0.0.2.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

Hashes for vara-pygelf-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f99cc0640eed717e91daef9e16049f88b97cd476c404c2a1ccaf32c0dc0a643d
MD5 d842770bdc7c767daf8d5091686d17ed
BLAKE2b-256 25497242964b4b2191ca4337e160a9e1bae2b50d657c466b8dcfe75e9442b11e

See more details on using hashes here.

File details

Details for the file vara_pygelf-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: vara_pygelf-0.0.2-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

Hashes for vara_pygelf-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a5a76f3817160e9f2f825a08dd74d728c3fd3bee49361f3611048d4c252b3dd
MD5 ca5355056a8211bb8b15ff086e906d7a
BLAKE2b-256 395b036e352e18a8ef2a8431a0d40521ef38d8449976aa0a8d39b444e5f809f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page