(const std::string &logger_name); // 将指定的日志器注册到日志器注册表中。void register_logger_(std::shared_ptr<logger> new_logger); // 从配置中设置日志器的日志级别。bool set_level_from_cfg_(logger *logger); // 对日志器注册表进行线程同步的互斥锁
virtual ~sink() =default;// 接收log消息virtualvoidlog(constdetails::log_msg &msg)=0;// 冲刷log消息virtualvoidflush()=0;// 设置模式virtualvoidset_pattern(conststd::string&pattern)=0;// 设置formatter(格式)virtualvoidset_formatter(std::unique_ptr<spdlog::formatter> sink_formatter)=0;// 设置...
std::bad_allococcurs mostly when passing a dangling pointer or a string that has not been null terminated. However, in GCC only, this error may be reported when spdlog and the application use different standard libraries (e.g.libstdc++andlibstdc++11). This problem has been reported more ofte...
once #include <string> //Fast to int to string //Source: http://stack.com/a/4351484/192001 //Base on :http://stackoverflow.com/a/4351484192001 //Modified version to pad zeros according to padding arg namespacespdlog @@ -103,4 +127,4 @@ inline std::string& fast_itostr(...
HANDLE hEventLog_{NULL}; internal::sid_tcurrent_user_sid_; std::string source_; WORD event_id_; HANDLEevent_log_handle() { if(!hEventLog_) { hEventLog_ = ::RegisterEventSourceA(nullptr, source_.c_str()); if(!hEventLog_ || hEventLog_ == (HANDLE)ERROR_ACCESS_DENIED) ...
}// 便捷创建logger对象, 其sink为null_sink_sttemplate<typename Factory = spdlog::synchronous_factory>inlinestd::shared_ptr<logger>null_logger_st(conststd::string&logger_name){autonull_logger = Factory::template create<sinks::null_sink_st>(logger_name); ...
}// 便捷创建logger对象, 其sink为null_sink_sttemplate<typename Factory = spdlog::synchronous_factory>inlinestd::shared_ptr<logger>null_logger_st(conststd::string&logger_name){autonull_logger = Factory::template create<sinks::null_sink_st>(logger_name); ...
std::string msg = StringFromFormat("Cannot load %s\nHRESULT 0x{:X} \"{}\"", module_path.c_str(), err.Error(), err.ErrorMessage()); PrintLog(msg.c_str()); spdlog::critical(msg); MessageBoxA(NULL, msg.c_str(), "Error", MB_ICONERROR); ExitProcess(hr); } 12 changes: 7 ad...
This branch is 2006 commits behind gabime/spdlog:v1.x.Folders and filesLatest commit gabime Fix issue gabime#1099 a33de60· Jun 4, 2019 History2,384 Commits bench Replace string pointer with string_view in log_msg Jun 4, 2019 cmake CMake use extract version from version.h May 29, 20...
using string_view_t = fmt::string_view; #endif #if defined(SPDLOG_NO_ATOMIC_LEVELS) using level_t = details::null_atomic_int; #else using level_t = std::atomic<int>; #endif #define SPDLOG_LEVEL_TRACE 0 #define SPDLOG_LEVEL_DEBUG 1 #define SPDLOG_LEVEL_INFO 2 #define SPDLOG_LEVEL...