Only log to warning if the config can't be read by the daemon

fix #1504
This commit is contained in:
Mike Arpaia 2015-09-16 10:53:28 -07:00
parent 7852c356ec
commit dc6e395b77

View File

@ -431,7 +431,12 @@ void Initializer::start() {
// Load the osquery config using the default/active config plugin.
auto s = Config::getInstance().load();
if (!s.ok()) {
LOG(ERROR) << "Error reading config: " << s.toString();
auto message = "Error reading config: " + s.toString();
auto severity = google::GLOG_INFO;
if (tool_ == OSQUERY_TOOL_DAEMON) {
severity = google::GLOG_WARNING;
}
google::LogMessage(__FILE__, __LINE__, severity, &message);
}
// Initialize the status and result plugin logger.