]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
log: use std::make_shared to replace new 12276/head
authorYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Fri, 9 Dec 2016 05:12:05 +0000 (13:12 +0800)
committerYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Fri, 9 Dec 2016 05:46:02 +0000 (13:46 +0800)
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
src/common/LogClient.cc
src/common/LogClient.h
src/log/Log.cc

index 353f94ba07bc73345c81fd4b426e0f712329df9d..443e026ff5cb032e7475d4ef4ce10107ef073840 100644 (file)
@@ -197,7 +197,7 @@ void LogChannel::update_config(map<string,string> &log_to_monitors,
   set_log_prio(prio);
 
   if (to_graylog && !graylog) { /* should but isn't */
-    graylog = ceph::logging::Graylog::Ref(new ceph::logging::Graylog("clog"));
+    graylog = std::make_shared<ceph::logging::Graylog>("clog");
   } else if (!to_graylog && graylog) { /* shouldn't but is */
     graylog.reset();
   }
index bf70e39a805222ef4071bf4bc4abea1c4d54b769..8e150cf5327c3b9c2f36e9b13e43e16eda7758df 100644 (file)
@@ -219,7 +219,7 @@ public:
     if (channels.count(name))
       c = channels[name];
     else {
-      c = LogChannelRef(new LogChannel(cct, this, name));
+      c = std::make_shared<LogChannel>(cct, this, name);
       channels[name] = c;
     }
     return c;
index 9f174dfb735cc61a2d15e6bfa15b288f932c8dc9..03e3c0de8f952ed12389ee5725d6521deb665756 100644 (file)
@@ -191,7 +191,7 @@ void Log::start_graylog()
 {
   pthread_mutex_lock(&m_flush_mutex);
   if (! m_graylog.get())
-    m_graylog = Graylog::Ref(new Graylog(m_subs, "dlog"));
+    m_graylog = std::make_shared<Graylog>(m_subs, "dlog");
   pthread_mutex_unlock(&m_flush_mutex);
 }