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 chars_betterlogs and add it to your code with:

from chars_betterlogs.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 chars_betterlogs.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.6.tar.gz (16.6 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.6-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chars_betterlogs-3.2.6.tar.gz
  • Upload date:
  • Size: 16.6 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.6.tar.gz
Algorithm Hash digest
SHA256 3a9961512a0006ee9c01d694b865e125fcc6b533c0ea3441741421fa825d1396
MD5 f014a53ab2b9d3b6a91f3b05851488ae
BLAKE2b-256 71cbf925f6370157bef8f4f616759a0b3fd4c2db299a65843373bd0e196f6313

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chars_betterlogs-3.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ff4045dee67796700096cc879f7d12e6835f895741b938d69d1126018cdfced8
MD5 e0f466d3e88944c3f328b36498e64543
BLAKE2b-256 e41d40f3c8d2b7883ad1c4e6ce8a04ff7e505c1aa397362fbe8c56e69d4b2149

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