17 #include <QPlainTextEdit>
24 template<
typename Mutex>
28 qt_sink(QObject *qt_object,
const std::string &meta_method)
46 Q_ARG(QString, QString::fromUtf8(str.
data(),
static_cast<int>(str.
size())).trimmed()));
65 template<
typename Factory = spdlog::synchronous_factory>
66 inline std::shared_ptr<logger>
qt_logger_mt(
const std::string &logger_name, QTextEdit *qt_object,
const std::string &meta_method =
"append")
68 return Factory::template create<sinks::qt_sink_mt>(logger_name, qt_object, meta_method);
71 template<
typename Factory = spdlog::synchronous_factory>
72 inline std::shared_ptr<logger>
qt_logger_st(
const std::string &logger_name, QTextEdit *qt_object,
const std::string &meta_method =
"append")
74 return Factory::template create<sinks::qt_sink_st>(logger_name, qt_object, meta_method);
77 template<
typename Factory = spdlog::synchronous_factory>
79 const std::string &logger_name, QPlainTextEdit *qt_object,
const std::string &meta_method =
"appendPlainText")
81 return Factory::template create<sinks::qt_sink_mt>(logger_name, qt_object, meta_method);
84 template<
typename Factory = spdlog::synchronous_factory>
86 const std::string &logger_name, QPlainTextEdit *qt_object,
const std::string &meta_method =
"appendPlainText")
88 return Factory::template create<sinks::qt_sink_st>(logger_name, qt_object, meta_method);
91 template<
typename Factory = spdlog::synchronous_factory>
92 inline std::shared_ptr<logger>
qt_logger_mt(
const std::string &logger_name, QObject *qt_object,
const std::string &meta_method)
94 return Factory::template create<sinks::qt_sink_mt>(logger_name, qt_object, meta_method);
97 template<
typename Factory = spdlog::synchronous_factory>
98 inline std::shared_ptr<logger>
qt_logger_st(
const std::string &logger_name, QObject *qt_object,
const std::string &meta_method)
100 return Factory::template create<sinks::qt_sink_st>(logger_name, qt_object, meta_method);