MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / set_log_level

Function set_log_level

dnn/test/gtest_main.cpp:16–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14megdnn::LogLevel min_log_level;
15
16void set_log_level() {
17 megdnn::LogLevel level = megdnn::LogLevel::INFO;
18 auto setting = std::getenv("MEGDNN_LOG_LEVEL");
19 if (setting) {
20 if (!strcmp(setting, "INFO")) {
21 level = megdnn::LogLevel::INFO;
22 } else if (!strcmp(setting, "DEBUG")) {
23 level = megdnn::LogLevel::DEBUG;
24 } else if (!strcmp(setting, "WARN")) {
25 level = megdnn::LogLevel::WARN;
26 } else {
27 megdnn_assert(!strcmp(setting, "ERROR"));
28 level = megdnn::LogLevel::ERROR;
29 }
30 }
31 min_log_level = level;
32}
33
34void log_handler(
35 megdnn::LogLevel level, const char* file, const char* func, int line,

Callers 15

gtest_mainFunction · 0.70
mainFunction · 0.50
basic_load_from_pathFunction · 0.50
load_from_path_run_cudaFunction · 0.50
run_NormalStrategyMethod · 0.50
mainFunction · 0.50
set_log_levelMethod · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected