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.2.tar.gz (4.4 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.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tbint_logger-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 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.2.tar.gz
Algorithm Hash digest
SHA256 d978aa5e7999f7b93bf4fde51f4f0c9155ae85e0a5769e74477c30c76ecf11a5
MD5 031cf62e4be8e75592e4661e788b6e4d
BLAKE2b-256 ba53d769b83cf9ea702f506213196b67b64a994ef08f94643a5809bd06cbd12f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tbint_logger-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a299d8f1c73ff91c31664199fc5e7be9b64477ece4ef64d0ea9ecaa2500574bb
MD5 4751b4a232181d502b068820aef34e36
BLAKE2b-256 fe4b180a65250b2f14039c9c1f613de5f3ef8212c343b303ab5c9daa7379e4c6

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