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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

sanduuzlogformatter-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for sanduuzlogformatter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e608c321b7c5d8d5738d1804fdcf58ad6b148b2d10ed1cfe5f84031f3df8901
MD5 4c735a849a6a614726e90035455d4044
BLAKE2b-256 8d2d62092cca9223886190d94e94a7d7029bd84432529289e6f66a34c3ff1d67

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