1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

js: support setLogLevel() / getLogLevel() calls

This commit is contained in:
Alexander Alekhin
2021-03-20 12:38:12 +00:00
parent 960f501cc1
commit a97f6f8058
3 changed files with 39 additions and 10 deletions
@@ -7,6 +7,7 @@
#include <opencv2/core/async.hpp>
#include <opencv2/core/detail/async_promise.hpp>
#include <opencv2/core/utils/logger.hpp>
#include <stdexcept>
@@ -144,7 +145,26 @@ AsyncArray testAsyncException()
return p.getArrayResult();
}
//! @}
}} // namespace
//! @} // core_utils
} // namespace cv::utils
//! @cond IGNORED
CV_WRAP static inline
int setLogLevel(int level)
{
// NB: Binding generators doesn't work with enums properly yet, so we define separate overload here
return cv::utils::logging::setLogLevel((cv::utils::logging::LogLevel)level);
}
CV_WRAP static inline
int getLogLevel()
{
return cv::utils::logging::getLogLevel();
}
//! @endcond IGNORED
} // namespaces cv / utils
#endif // OPENCV_CORE_BINDINGS_UTILS_HPP