]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: add 'log ....' command
authorSage Weil <sage@newdream.net>
Tue, 21 Jun 2011 19:13:38 +0000 (12:13 -0700)
committerSage Weil <sage@newdream.net>
Tue, 21 Jun 2011 19:29:23 +0000 (12:29 -0700)
Just sticks something in the central log.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/Monitor.cc

index d9a5d792f6b8d490141b3dd9e55fe45e5b98a96c..0f6e5f205160b3eb872044d5d219797f519a2899 100644 (file)
@@ -335,6 +335,18 @@ void Monitor::handle_command(MMonCommand *m)
       monmon()->dispatch(m);
       return;
     }
+    if (m->cmd[0] == "log") {
+      stringstream ss;
+      for (unsigned i=1; i<m->cmd.size(); i++) {
+       if (i > 1)
+         ss << ' ';
+       ss << m->cmd[i];
+      }
+      clog.info(ss);
+      rs = "ok";
+      reply_command(m, 0, rs, rdata, 0);
+      return;
+    }
     if (m->cmd[0] == "stop") {
       shutdown();
       reply_command(m, 0, "stopping", 0);