UNKNOWN
Project description
technicolor
logging in colour
introduction
technicolor provides logging in colour and logging of function usage by means of a simple decorator.
quick start
In the main code of the program could be a technicolor logging setup such as the following:
global log
log = logging.getLogger(__name__)
logging.root.addHandler(technicolor.ColorisingStreamHandler())
if self.verbose:
logging.root.setLevel(logging.DEBUG)
else:
logging.root.setLevel(logging.INFO)
Then, in modules imported, there could be a logging setup such as the following:
log = logging.getLogger(__name__)
The function logging of technicolor logs the name of the function called, the caller of the function and the arguments of the function used. This functionality can be engaged by using a decorator in a way such as the following:
@technicolor.log
def function1(
a,
b,
c = 4,
d = 5,
e = 6
):
return(a + b + c + d + e)
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
File details
Details for the file technicolor-2017.1.16.1544.tar.gz
.
File metadata
- Download URL: technicolor-2017.1.16.1544.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 667c2fad8265c13610eed331d2ec758874dc1e550ece5804bbed9187f2df2bea |
|
MD5 | 22bb4e08531995862d31fdd0f6bed9b2 |
|
BLAKE2b-256 | 2be477fd62d1a11f4ef2d47cb77efac62de3068bdece0dde68409343945b76fe |