Skip to content

Commit 217a4dd

Browse files
committed
tesseract: Disable Leptonica messages
Disable debugging and informational messages from Leptonica for release builds. Signed-off-by: Stefan Weil <[email protected]>
1 parent 929d25c commit 217a4dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/tesseractmain.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ int main(int argc, char** argv) {
388388
static GenericVector<STRING> vars_vec;
389389
static GenericVector<STRING> vars_values;
390390

391+
#if !defined(DEBUG)
392+
// Disable debugging and informational messages from Leptonica.
393+
setMsgSeverity(L_SEVERITY_WARNING);
394+
#endif
395+
391396
#if defined(HAVE_TIFFIO_H) && defined(_WIN32)
392397
/* Show libtiff warnings on console (not in GUI). */
393398
TIFFSetWarningHandler(Win32WarningHandler);

0 commit comments

Comments
 (0)