Function log

Summary

#include <include/spdlog/logger.h>

(1) template <typename FormatString, typename std::enable_if< fmt::is_compile_string< FormatString >::value, int >::type = 0, typename... Args>
    void log(source_loc loc, level::level_enum lvl, const FormatString &fmt, Args &&...args)

(2) template <typename... Args>
    void log(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args)

(3) template <typename FormatString, typename... Args>
    void log(level::level_enum lvl, const FormatString &fmt, Args &&...args)

(4) template <typename T>
    void log(level::level_enum lvl, const T &msg)

(5) template <class T, typename std::enable_if< std::is_convertible< const T &, spdlog::string_view_t >::value &&!fmt::is_compile_string< T >::value, int >::type = 0>
    void log(source_loc loc, level::level_enum lvl, const T &msg)

(6) void log(log_clock::time_point log_time, source_loc loc, level::level_enum lvl, string_view_t msg)

(7) void log(source_loc loc, level::level_enum lvl, string_view_t msg)

(8) void log(level::level_enum lvl, string_view_t msg)

(9) template <class T, typename std::enable_if<!std::is_convertible< const T &, spdlog::string_view_t >::value &&!is_convertible_to_wstring_view< const T & >::value, int >::type = 0>
    void log(source_loc loc, level::level_enum lvl, const T &msg)

Function overload

Synopsis

#include <include/spdlog/logger.h>

template <typename FormatString, typename std::enable_if< fmt::is_compile_string< FormatString >::value, int >::type = 0, typename... Args>
void log(source_loc loc, level::level_enum lvl, const FormatString &fmt, Args &&...args)

Description

FormatString is a type derived from fmt::compile_string.

Source

Lines 78-82 in include/spdlog/logger.h.

template<typename FormatString, typename std::enable_if<fmt::is_compile_string<FormatString>::value, int>::type = 0, typename... Args>
void log(source_loc loc, level::level_enum lvl, const FormatString &fmt, Args &&...args)
{
    log_(loc, lvl, fmt, std::forward<Args>(args)...);
}

Synopsis

#include <include/spdlog/logger.h>

template <typename... Args>
void log(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args)

Description

FormatString is NOT a type derived from fmt::compile_string but is a string_view_t or can be implicitly converted to one.

Source

Lines 85-89 in include/spdlog/logger.h.

template<typename... Args>
void log(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args)
{
    log_(loc, lvl, fmt, std::forward<Args>(args)...);
}

Synopsis

#include <include/spdlog/logger.h>

template <typename FormatString, typename... Args>
void log(level::level_enum lvl, const FormatString &fmt, Args &&...args)

Description

No description yet.

Source

Lines 91-95 in include/spdlog/logger.h.

template<typename FormatString, typename... Args>
void log(level::level_enum lvl, const FormatString &fmt, Args &&...args)
{
    log(source_loc{}, lvl, fmt, std::forward<Args>(args)...);
}

Synopsis

#include <include/spdlog/logger.h>

template <typename T>
void log(level::level_enum lvl, const T &msg)

Description

No description yet.

Source

Lines 133-137 in include/spdlog/logger.h.

template<typename T>
void log(level::level_enum lvl, const T &msg)
{
    log(source_loc{}, lvl, msg);
}

Synopsis

#include <include/spdlog/logger.h>

template <class T, typename std::enable_if< std::is_convertible< const T &, spdlog::string_view_t >::value &&!fmt::is_compile_string< T >::value, int >::type = 0>
void log(source_loc loc, level::level_enum lvl, const T &msg)

Description

T can be statically converted to string_view and isn't a fmt::compile_string.

Source

Lines 140-145 in include/spdlog/logger.h.

template<class T, typename std::enable_if<
                      std::is_convertible<const T &, spdlog::string_view_t>::value && !fmt::is_compile_string<T>::value, int>::type = 0>
void log(source_loc loc, level::level_enum lvl, const T &msg)
{
    log(loc, lvl, string_view_t{msg});
}

Synopsis

#include <include/spdlog/logger.h>

void log(log_clock::time_point log_time, source_loc loc, level::level_enum lvl, string_view_t msg)

Description

No description yet.

Source

Lines 147-158 in include/spdlog/logger.h.

void log(log_clock::time_point log_time, source_loc loc, level::level_enum lvl, string_view_t msg)
{
    bool log_enabled = should_log(lvl);
    bool traceback_enabled = tracer_.enabled();
    if (!log_enabled && !traceback_enabled)
    {
        return;
    }
    details::log_msg log_msg(log_time, loc, name_, lvl, msg);
    log_it_(log_msg, log_enabled, traceback_enabled);
}

Synopsis

#include <include/spdlog/logger.h>

void log(source_loc loc, level::level_enum lvl, string_view_t msg)

Description

No description yet.

Source

Lines 160-171 in include/spdlog/logger.h.

void log(source_loc loc, level::level_enum lvl, string_view_t msg)
{
    bool log_enabled = should_log(lvl);
    bool traceback_enabled = tracer_.enabled();
    if (!log_enabled && !traceback_enabled)
    {
        return;
    }
    details::log_msg log_msg(loc, name_, lvl, msg);
    log_it_(log_msg, log_enabled, traceback_enabled);
}

Synopsis

#include <include/spdlog/logger.h>

void log(level::level_enum lvl, string_view_t msg)

Description

No description yet.

Source

Lines 173-176 in include/spdlog/logger.h.

void log(level::level_enum lvl, string_view_t msg)
{
    log(source_loc{}, lvl, msg);
}

Synopsis

#include <include/spdlog/logger.h>

template <class T, typename std::enable_if<!std::is_convertible< const T &, spdlog::string_view_t >::value &&!is_convertible_to_wstring_view< const T & >::value, int >::type = 0>
void log(source_loc loc, level::level_enum lvl, const T &msg)

Description

T cannot be statically converted to string_view or wstring_view.

Source

Lines 179-185 in include/spdlog/logger.h.

template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value &&
                                              !is_convertible_to_wstring_view<const T &>::value,
                      int>::type = 0>
void log(source_loc loc, level::level_enum lvl, const T &msg)
{
    log(loc, lvl, "{}", msg);
}





Add Discussion

Log in to comment