Hi!
Currently svmbir prints to console all it's messages. This makes ist somewhat hacky to use inside other projects, which have a propper logging interface or a CLI.
There basically two options I would suggest going forward:
- Use a real logging library like python's
loggingmodule and make use of the differen log levels to differentiate severity of messages
- More effort needed as all print statements have to be evaluated and changed
- But also more value gained as information of logging is differentiated better and the consumer can use level or location filters to filter messages he wants
- Replace
print calls by a _print function which is defined in the svmbir module and defaults to _print = print
- Less effort, can be basically done mostly by search and replace
- Quite hacky
- Not much value gained as consumer has to parse the printed messages to determine leves for logging and locating the message is not possible
Cheers,
Jörn
Hi!
Currently svmbir prints to console all it's messages. This makes ist somewhat hacky to use inside other projects, which have a propper logging interface or a CLI.
There basically two options I would suggest going forward:
loggingmodule and make use of the differen log levels to differentiate severity of messagesprintcalls by a_printfunction which is defined in thesvmbirmodule and defaults to_print = printCheers,
Jörn