Currently the log messages from tesseract and the training tools don't use a uniform logging API, but call tprintf, printf or fprintf to stderr.
It would be nice to have clear log levels (DEBUG, INFO, WARNING, ERROR) with distinct message texts.
It should be possible for users to suppress output from log levels, for example restrict messages to WARNING and ERROR only.
Third party software using the Tesseract API should be able to handle log messages with their own code.
Common logging libraries also allow advanced configurations which redirect the single log levels to different targets (stdout, stderr, file, syslog, ...).
Maybe both a functional and a stream based logging API would be helpful.
Any thoughts on this? Are these suggestions desirable?
Are there available solutions which can be used by the Tesseract code, or would a local implementation be sufficient?