OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.58k stars 2.19k forks source link

Controls for console print verbosity across imageAI #305

Open auphofBSF opened 5 years ago

auphofBSF commented 5 years ago

A more consistent and multi-functional global level of verbosity control,
suggest an enhancement that will see print(...) in project be converted to using the python logging. module

import logging
#Then instead of print() use either
logging.info(......)
#or
logging.debug(.....)
#or
logging.warning(....)
#or
#logging.error()

In that way verbosity can be globally configured for each application usage of imageai and granularly adjusted for each class with a diverse set of logging options up to the final user.

Logging can be directed to console,files,db or 3rd party monitoring apps and be configured for style (timestamps,source, etc)

Look forward to other suggestion and possibly putting this on the enhancements list

Originally posted by @auphofBSF in https://github.com/OlafenwaMoses/ImageAI/pull/302#issuecomment-523647338

rola93 commented 5 years ago

would love to hear @OlafenwaMoses thougths on this. Looks like a good improvement.

Should consider that keras output may not be that easy to redirect to logging

OlafenwaMoses commented 5 years ago

@rola93 @auphofBSF I have commented on this before that using logging is something that is worth considering, since it does allow more functionalities than the traditional print. I will still review the pipeline of implementing this and let you all know we should go ahead with it.