Skip to main content

A simple logging configuration module

Project description

Sane Logger

This module provides a simple logging configuration with a named logger for Python applications.

The settings are %(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s.

Installation

You can install the package using pip:

pip install a_sane_logger

Usage

Simply import the module in your code and use the logger:

import a_sane_logger as sn

logger = sn.sane_logger

logger.info("This is an info message.")
logger.error("This is an error message.")

The logs should look like:

2024-10-09 18:57:24,520 [MainThread  ] [INFO ]  This is an info message.
2024-10-09 18:57:26,204 [MainThread  ] [ERROR]  This is an error message.

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

a_sane_logger-0.3.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

a_sane_logger-0.3-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file a_sane_logger-0.3.tar.gz.

File metadata

  • Download URL: a_sane_logger-0.3.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for a_sane_logger-0.3.tar.gz
Algorithm Hash digest
SHA256 336ba87ecab60ac798b2dda5a317ce61b9cae3833edb9c9a1c8b253892f56da4
MD5 63f8572cefb8c247cb002b264ada2b98
BLAKE2b-256 4fb03e16296ade1b0add4b94cb25d411ae219b749bcc17d4978eb863166e1d23

See more details on using hashes here.

File details

Details for the file a_sane_logger-0.3-py3-none-any.whl.

File metadata

  • Download URL: a_sane_logger-0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for a_sane_logger-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0ef3ed45e1bcb7a464567a077391c440ae3653ddcf1caa6425c0a71521f184a1
MD5 e79dd82721796329fb1c006abb4b3721
BLAKE2b-256 fa7130ef202a6d10f2c239c59dc05b93ccf556fe771010d7ec3ce67c8958927e

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