Skip to main content

Sanduuz Log Formatter (SLF) is a custom log formatter for the python logging library

Project description

Sanduuz Log Formatter (SLF)

Sanduuz Log Formatter is a custom log formatter for the python logging library.

Usage:

import logging
from sanduuzlogformatter import SanduuzLogFormatter

formatter = SanduuzLogFormatter()

stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)

logger = logging.getLogger()
logger.addHandler(stream_handler)
logger.setLevel(logging.INFO)

logger.info("This is a message from SLF!")

Features:

A custom date format can be given to the formatter during initialization:

formatter = SanduuzLogFormatter(datefmt="%Y-%m-%d")

A custom maximum length for the info section | module:function:linenumber | can be given to the formatter during initialization:

formatter = SanduuzLogFormatter(info_section_max_length=75)

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

sanduuzlogformatter-1.0.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

sanduuzlogformatter-1.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file sanduuzlogformatter-1.0.1.tar.gz.

File metadata

  • Download URL: sanduuzlogformatter-1.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for sanduuzlogformatter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 370664fde4d92d51a02c5fe37e592dbe5fcf9a13164d4a346bdad877d6c91efb
MD5 c6c2fd9fabb459343e85d2da62a3a757
BLAKE2b-256 793f869c173f0c7523d854b3a7d2610c68fef3fa5c103243f9da2fc4155126ed

See more details on using hashes here.

File details

Details for the file sanduuzlogformatter-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sanduuzlogformatter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a53de8a92b6db73850111b0a82c7d402b3ef60c976e5708728d4b4b759627e46
MD5 ebec9b8b293c88e41cf2c56a374553af
BLAKE2b-256 6a889984e28d5ddbcd89c3142c25d3cfd1621c470923ef7b7fbd22597cf3e22e

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