Sha256: d2f742ffd54151670a8044922f4a0c501d125642906359b4f94d3a73f54e38b1

Contents?: true

Size: 753 Bytes

Versions: 8

Compression:

Stored size: 753 Bytes

Contents

// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)

#pragma once

#include "registry.h"

namespace spdlog {

// Default logger factory-  creates synchronous loggers
class logger;

struct synchronous_factory
{
    template<typename Sink, typename... SinkArgs>
    static std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs &&...args)
    {
        auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...);
        auto new_logger = std::make_shared<spdlog::logger>(std::move(logger_name), std::move(sink));
        details::registry::instance().initialize_logger(new_logger);
        return new_logger;
    }
};
} // namespace spdlog

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
couchbase-3.5.0 ext/cache/spdlog/66ab2619a0014319471759c03e2de1af6bda14de/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.4.5 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.4.4 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.4.3 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.4.2 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.4.1 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.4.0 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h
couchbase-3.3.0 ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h