Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
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();
}
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;
{
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);
}