Skip to main content

A simple logger for tbint projects

Project description

TBint Logger Python

The TBINT Logger Python is a simple logger that can also send logs to Datadog.

It streamlines the process of logging, conforming to our standards.

Usage

Create a .env file with the following content:

# LOG_LEVEL can be debug, info, warning, error
LOG_LEVEL=debug
DD_SERVICE_NAME=YOUR_SERVICE_NAME_HERE
DD_SOURCE=production_or_any_other_environment
# Get these values from Datadog
DD_API_ENDPOINT=https://http-intake.logs.datadoghq.eu/api/v2/logs
# Get these values from Datadog
DD_APP_KEY=YOUR_DD_APP_KEY

Create this python file:

from tbint_logger import tbint_logger

logger = tbint_logger.Logger()

logger.info_sync(
    tbint_logger.Data(
        description="This is a test",
    )
)

Development

python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade build
python3 -m build
python3 -m pip install --upgrade twine
python3 -m twine upload --repository pypi dist/*

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

tbint_logger-0.0.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

tbint_logger-0.0.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file tbint_logger-0.0.4.tar.gz.

File metadata

  • Download URL: tbint_logger-0.0.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for tbint_logger-0.0.4.tar.gz
Algorithm Hash digest
SHA256 276f2debdd9a0eee88b635bf68d13112aa67ead82d86dba159ab373f493b6662
MD5 866bfe0f3b8b60c73566370fb33f6b80
BLAKE2b-256 f475950476a29623b427e0e1aa7f5a3bece258066e25ecc1a9d31b16e32e12b8

See more details on using hashes here.

File details

Details for the file tbint_logger-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: tbint_logger-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for tbint_logger-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bab8832b1b6f78c6362b7b4cbe5220161d79dd012cae4ebb93420b9048012e51
MD5 7126e5781018637b593360e623f8ed08
BLAKE2b-256 8fa373a5be40c22a3e5db72a0efa44fc8591f139c567f6679adaeb8f7fad1486

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