Skip to content

About

Made to replace Python's importable Logging lib because it didnt work how i wanted it to, and kept not actually writing logs to a file

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

53 Commits

Folders and files

Repository files navigation

Char's Better Logs

Tip

Install pre-release versions with my new project PTGit!

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')

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

About

Made to replace Python's importable Logging lib because it didnt work how i wanted it to, and kept not actually writing logs to a file

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages