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 SLF

formatter = SLF()

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 = SLF(datefmt="%Y-%m-%d")

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

formatter = SLF(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.2.tar.gz (2.8 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.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sanduuzlogformatter-1.0.2.tar.gz
  • Upload date:
  • Size: 2.8 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.2.tar.gz
Algorithm Hash digest
SHA256 7fb136dc84950400be71fed4b2ad7411df9e6894a7d61dcc7a18318b3d4b1e47
MD5 e88b6350e45cc380999f641640a81276
BLAKE2b-256 a7abe1f794a732e48d9c7b1028567ed93d9edf25b351da056d6616bbacc881e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sanduuzlogformatter-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1465111058f649c24c90b5bf2669ca913e193f53f285244f50c3aa5ae813041
MD5 ad2bb5650419209eaa4e930c6aed293f
BLAKE2b-256 1a4163ec2ee82db788ece27bd8205c355c40d7fde79296bb14f060e118775cb7

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