Skip to content

Commit 0c08094

Browse files
committed
Merge pull request opencv#9039 from arrybn:disable_caffe_parser_logs
2 parents 2ac8190 + fab4f4b commit 0c08094

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/dnn/src/caffe/glog_emulator.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class GLogWrapper
5959
{
6060
const char *file, *func, *type, *cond_str;
6161
int line;
62-
bool cond_staus, exit_loop;
62+
bool cond_status, exit_loop;
6363
std::stringstream sstream;
6464

6565
public:
@@ -69,7 +69,7 @@ class GLogWrapper
6969
const char *_cond_str = NULL, bool _cond_status = true
7070
) :
7171
file(_file), func(_func), type(_type), cond_str(_cond_str),
72-
line(_line), cond_staus(_cond_status), exit_loop(true) {}
72+
line(_line), cond_status(_cond_status), exit_loop(true) {}
7373

7474
std::iostream &stream()
7575
{
@@ -85,16 +85,18 @@ class GLogWrapper
8585
{
8686
exit_loop = false;
8787

88-
if (cond_str && !cond_staus)
88+
if (cond_str && !cond_status)
8989
{
9090
cv::error(cv::Error::StsError, "FAILED: " + String(cond_str) + ". " + sstream.str(), func, file, line);
9191
}
9292
else if (!cond_str && strcmp(type, "CHECK"))
9393
{
94+
#ifndef NDEBUG
9495
if (!std::strcmp(type, "INFO"))
9596
std::cout << sstream.str() << std::endl;
9697
else
9798
std::cerr << sstream.str() << std::endl;
99+
#endif
98100
}
99101
}
100102
};

0 commit comments

Comments
 (0)