Function logger

Summary

#include <include/spdlog/logger.h>

(1) explicit logger(std::string name)

(2) template <typename It>
    logger(std::string name, It begin, It end)

(3) logger(std::string name, sink_ptr single_sink)

(4) logger(std::string name, sinks_init_list sinks)

(5) logger(const logger &other)

(6) logger(logger &&other) SPDLOG_NOEXCEPT

Function overload

Synopsis

#include <include/spdlog/logger.h>

explicit logger(std::string name)

Description

Empty logger.

Source

Lines 47-50 in include/spdlog/logger.h.

explicit logger(std::string name)
    : name_(std::move(name))
    , sinks_()
{}

Synopsis

#include <include/spdlog/logger.h>

template <typename It>
logger(std::string name, It begin, It end)

Description

Logger with range on sinks.

Source

Lines 53-57 in include/spdlog/logger.h.

template<typename It>
logger(std::string name, It begin, It end)
    : name_(std::move(name))
    , sinks_(begin, end)
{}

Synopsis

#include <include/spdlog/logger.h>

logger(std::string name, sink_ptr single_sink)

Description

Logger with single sink.

Source

Lines 60-62 in include/spdlog/logger.h.

logger(std::string name, sink_ptr single_sink)
    : logger(std::move(name), {std::move(single_sink)})
{}

Synopsis

#include <include/spdlog/logger.h>

logger(std::string name, sinks_init_list sinks)

Description

Logger with sinks init list.

Source

Lines 65-67 in include/spdlog/logger.h.

logger(std::string name, sinks_init_list sinks)
    : logger(std::move(name), sinks.begin(), sinks.end())
{}

Synopsis

#include <include/spdlog/logger.h>

logger(const logger &other)

Description

public methods

Source

Lines 19-26 in include/spdlog/logger-inl.h. Line 71 in include/spdlog/logger.h.

SPDLOG_INLINE logger::logger(const logger &other)
    : name_(other.name_)
    , sinks_(other.sinks_)
    , level_(other.level_.load(std::memory_order_relaxed))
    , flush_level_(other.flush_level_.load(std::memory_order_relaxed))
    , custom_err_handler_(other.custom_err_handler_)
    , tracer_(other.tracer_)
{}

Synopsis

#include <include/spdlog/logger.h>

logger(logger &&other) SPDLOG_NOEXCEPT

Description

No description yet.

Source

Lines 28-35 in include/spdlog/logger-inl.h. Line 72 in include/spdlog/logger.h.

SPDLOG_INLINE logger::logger(logger &&other) SPDLOG_NOEXCEPT : name_(std::move(other.name_)),
                                                               sinks_(std::move(other.sinks_)),
                                                               level_(other.level_.load(std::memory_order_relaxed)),
                                                               flush_level_(other.flush_level_.load(std::memory_order_relaxed)),
                                                               custom_err_handler_(std::move(other.custom_err_handler_)),
                                                               tracer_(std::move(other.tracer_))

{}





Add Discussion

Log in to comment