Skip to main content

A project started to fix a problem I was having with the default python logging library

Project description

Char's Better Python Logger

A project started to fix a problem I was having with the default python logging library

USAGE

Simply install it with pip install betterlogs and add it to your code with:

from logs import Logging

then make a variable:

#                         The Filename         String to add before the log        Whether to print the log (Defaults to True)
logger:Logging = Logging('filename.log', 'This gets added before the log starts!', False)

Tada you now have a callable logger!

Example Script

from logs import Logging
from datetime import datetime

logger:Logging = Logging('log_' + str(datetime.today().strftime('%d_%m_%Y-%H_%M_%S')) + '.log')

logging.log_info('yipee!')
logging.close() # Don't forget to end the log file before the script ends!

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

chars_betterlogs-3.2.5.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

chars_betterlogs-3.2.5-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file chars_betterlogs-3.2.5.tar.gz.

File metadata

  • Download URL: chars_betterlogs-3.2.5.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chars_betterlogs-3.2.5.tar.gz
Algorithm Hash digest
SHA256 2d81a10f475f3661ca8d22ddabe2dc147c57d37075805661a63ae85ea8f8cac7
MD5 a6404589588fb9045c103a424c97155d
BLAKE2b-256 0857f17d0738560756b34ce62a2eab20e00f36783c4c36679f3b5b9c66b3e172

See more details on using hashes here.

File details

Details for the file chars_betterlogs-3.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for chars_betterlogs-3.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 50d8c7844a2d5acde5d11012054ec745ee264bd32382c9915a343a493a364363
MD5 1d9a349dfc4358543e2dee37e8af304f
BLAKE2b-256 6f32d908344e2fbca2e9ee90e90512a63c2ba61a84f438a7a0dd138ff54e7e92

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