]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: LogClient: output to derr (i.e., dout(-1)) on CLOG_ERROR 2016/head
authorJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 22:05:02 +0000 (23:05 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 22:09:30 +0000 (23:09 +0100)
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/common/LogClient.cc

index 1e290b12a23f17d94d9572fb69d54891e1b01b47..6ecc88ac9a76e5328f3d30f015719552e699b8f2 100644 (file)
@@ -76,7 +76,8 @@ void LogClient::do_log(clog_type type, std::stringstream& ss)
 void LogClient::do_log(clog_type type, const std::string& s)
 {
   Mutex::Locker l(log_lock);
-  ldout(cct,0) << "log " << type << " : " << s << dendl;
+  int lvl = (type == CLOG_ERROR ? -1 : 0);
+  ldout(cct,lvl) << "log " << type << " : " << s << dendl;
   LogEntry e;
   e.who = messenger->get_myinst();
   e.stamp = ceph_clock_now(cct);