CUIでもエラーログの設定を行うようにした

This commit is contained in:
lltcggie 2015-12-07 17:00:01 +09:00
parent 30b8c5fd2e
commit 361c14ccba

View File

@ -5,6 +5,8 @@
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <functional> #include <functional>
#include <boost/tokenizer.hpp> #include <boost/tokenizer.hpp>
#include <boost/tokenizer.hpp>
#include <glog/logging.h>
#include "../common/waifu2x.h" #include "../common/waifu2x.h"
@ -52,6 +54,14 @@ int main(int argc, char** argv)
{ {
Waifu2x::init_liblary(); Waifu2x::init_liblary();
// Caffeのエラーでないログを保存しないようにする
google::SetLogDestination(google::INFO, "");
google::SetLogDestination(google::WARNING, "");
// Caffeのエラーログを「error_log_」に出力
google::SetLogDestination(google::ERROR, "error_log_");
google::SetLogDestination(google::FATAL, "error_log_");
// definition of command line arguments // definition of command line arguments
TCLAP::CmdLine cmd("waifu2x reimplementation using Caffe", ' ', "1.0.0"); TCLAP::CmdLine cmd("waifu2x reimplementation using Caffe", ' ', "1.0.0");