Useful towel-related stuff.
Project description
consoleTools
A python module made for server applications for formatting and logging
##What am I? We needed a logging tool and console display tool with a fancy output with colours, so we quickly whipped this together. Other features will be implemented to this over-time as we need more things in our console apps.
All logs are stored in logs/
date-log.txt
Usage
#Logging and displaying console output
from consoleTools import consoleDisplay as cd
cd.log('e','I am an error')
cd.log('w','I am a warning')
cd.log('i','I am an information message')
cd.log('n',"I am a notice and therefore have no formatting as I'm not that important")
cd.log('s','Woo-hoo! Your thing worked')
Questions people asked when making this (but not in their words)
q) B... b... but I don't want it to log to a file Brendan!
a) Well the #### you, we added that:
cd.log('s','I will not log to a file',False)
Add the boolean flag False
and nothing will be logged to a file
q) I don't want to log to logs/
. Why are you making me do this
a) By adding the simple flag file=x
you can set whatever you want there
cd.log('s','I will log to a custom file',file="thisfilecontainsthe.log")```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Console_Tools-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7582000050e48b7d595bb3080922b499e81f9faf924192f9a15a7825f5b57b |
|
MD5 | 23830398d14bbd56344aadad8cb38233 |
|
BLAKE2b-256 | 18c2a7c1f674b7aca882aa62b12c0ef126110205cdb234792567f22197be1595 |