Make it so FATAL messages from libmv are print to the console

even when --debug-libmv is not passed via command line.
This commit is contained in:
Sergey Sharybin 2013-04-15 10:02:33 +00:00
parent f294b3b082
commit 79ca1bd004

@ -77,11 +77,16 @@ typedef struct libmv_Features {
void libmv_initLogging(const char *argv0) void libmv_initLogging(const char *argv0)
{ {
/* 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); google::InitGoogleLogging(argv0);
google::SetCommandLineOption("logtostderr", "1"); google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "0"); google::SetCommandLineOption("v", "0");
google::SetCommandLineOption("stderrthreshold", "7"); google::SetCommandLineOption("stderrthreshold", severity_fatal);
google::SetCommandLineOption("minloglevel", "7"); google::SetCommandLineOption("minloglevel", severity_fatal);
} }
void libmv_startDebugLogging(void) void libmv_startDebugLogging(void)