litmus.logging
logging.py
Collection of logging functions in a handy inheritable class, to make it easier to edit later in one place
logger(out_stream=sys.stdout, err_stream=sys.stderr, verbose: bool = True, debug: bool = False)
Object class that contains methods for printing to debug, verbose and error streams. Internal behaviour may change in future releases
Parameters:
Name | Type | Description | Default |
---|---|---|---|
out_stream
|
Stream to print run and debug messages to |
stdout
|
|
err_stream
|
Stream to print error messages to |
stderr
|
|
verbose
|
bool
|
Whether to print msg_run statements |
True
|
debug
|
bool
|
Whether to print msg_debug statements |
False
|
Source code in litmus/logging.py
16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
out_stream = out_stream
instance-attribute
err_stream = err_stream
instance-attribute
verbose = verbose
instance-attribute
debug = debug
instance-attribute
msg_err(*x: str, end='\n', delim=' ')
Messages for when something has broken or been called incorrectly
Source code in litmus/logging.py
32 33 34 35 36 37 38 39 40 41 |
|
msg_run(*x: str, end='\n', delim=' ')
Standard messages about when things are running
Source code in litmus/logging.py
43 44 45 46 47 48 49 50 51 52 |
|
msg_verbose(*x: str, end='\n', delim=' ')
Explicit messages to help debug when things are behaving strangely
Source code in litmus/logging.py
54 55 56 57 58 59 60 61 62 63 |
|