| 46 | inline void SetLogLevel(int level) { log_level = level; } |
| 47 | |
| 48 | inline void SetLogFile(std::string path) { |
| 49 | ::google::InitGoogleLogging(path.c_str()); |
| 50 | std::string info_log_path = path + ".info.log."; |
| 51 | std::string warning_log_path = path + ".warning.log."; |
| 52 | ::google::SetLogDestination(::google::INFO, info_log_path.c_str()); |
| 53 | ::google::SetLogDestination(::google::WARNING, warning_log_path.c_str()); |
| 54 | } |
| 55 | |
| 56 | } // namespace base |
| 57 | } // namespace fedb |