diff options
Diffstat (limited to 'intern/cycles/util/util_logging.cpp')
-rw-r--r-- | intern/cycles/util/util_logging.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/intern/cycles/util/util_logging.cpp b/intern/cycles/util/util_logging.cpp index 1aff647a6bb..03041723e15 100644 --- a/intern/cycles/util/util_logging.cpp +++ b/intern/cycles/util/util_logging.cpp @@ -28,16 +28,18 @@ CCL_NAMESPACE_BEGIN void util_logging_init(const char *argv0) { #ifdef WITH_CYCLES_LOGGING + using CYCLES_GFLAGS_NAMESPACE::SetCommandLineOption; + /* Make it so FATAL messages are always print into console. */ char severity_fatal[32]; snprintf(severity_fatal, sizeof(severity_fatal), "%d", google::GLOG_FATAL); google::InitGoogleLogging(argv0); - gflags::SetCommandLineOption("logtostderr", "1"); - gflags::SetCommandLineOption("v", "0"); - gflags::SetCommandLineOption("stderrthreshold", severity_fatal); - gflags::SetCommandLineOption("minloglevel", severity_fatal); + SetCommandLineOption("logtostderr", "1"); + SetCommandLineOption("v", "0"); + SetCommandLineOption("stderrthreshold", severity_fatal); + SetCommandLineOption("minloglevel", severity_fatal); #else (void) argv0; #endif @@ -46,19 +48,21 @@ void util_logging_init(const char *argv0) void util_logging_start(void) { #ifdef WITH_CYCLES_LOGGING - gflags::SetCommandLineOption("logtostderr", "1"); - gflags::SetCommandLineOption("v", "2"); - gflags::SetCommandLineOption("stderrthreshold", "1"); - gflags::SetCommandLineOption("minloglevel", "0"); + using CYCLES_GFLAGS_NAMESPACE::SetCommandLineOption; + SetCommandLineOption("logtostderr", "1"); + SetCommandLineOption("v", "2"); + SetCommandLineOption("stderrthreshold", "1"); + SetCommandLineOption("minloglevel", "0"); #endif } void util_logging_verbosity_set(int verbosity) { #ifdef WITH_CYCLES_LOGGING + using CYCLES_GFLAGS_NAMESPACE::SetCommandLineOption; char val[10]; snprintf(val, sizeof(val), "%d", verbosity); - gflags::SetCommandLineOption("v", val); + SetCommandLineOption("v", val); #else (void) verbosity; #endif |