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.5.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.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tbint_logger-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 0fe68a10c3273f353e4d63f06c93a682bea033b43468555048bc95f80001eaf6
MD5 4449b481713146eaf6fb3c22123dbcaa
BLAKE2b-256 57dd3220d0ec7035ace3cf045d29bbf947fb990cd0cbbe259338c9f7942020ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tbint_logger-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 05ba1b7a13a67a70e7574e643045a6a2fb7e528232ba073a8ff17de8905385a8
MD5 2f58c8f4beb3f79ea2eec641a71c02f8
BLAKE2b-256 256e2ce6662d64e632f94d5ef9bc5baafbdc7c2ccf13e9edac8e9528c3521120

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