Skip to content

Commit

Permalink
tesseract: Disable Leptonica messages
Browse files Browse the repository at this point in the history
Disable debugging and informational messages from Leptonica
for release builds.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 7, 2016
1 parent 929d25c commit 217a4dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/tesseractmain.cpp
Expand Up @@ -388,6 +388,11 @@ int main(int argc, char** argv) {
static GenericVector<STRING> vars_vec;
static GenericVector<STRING> vars_values;

#if !defined(DEBUG)
// Disable debugging and informational messages from Leptonica.
setMsgSeverity(L_SEVERITY_WARNING);
#endif

#if defined(HAVE_TIFFIO_H) && defined(_WIN32)
/* Show libtiff warnings on console (not in GUI). */
TIFFSetWarningHandler(Win32WarningHandler);
Expand Down

0 comments on commit 217a4dd

Please sign in to comment.