auto daily_sink = std::make_shared<spdlog::sinks::daily_file_sink_mt>("logs/daily", 2, 30, false, 7); 创建logger对象并绑定sink: 使用spdlog::create 或spdlog::logger 的构造函数来创建一个logger对象,并将上面创建的sink绑定到该logger。cpp auto daily_logger = spdlog::create<spdl...
* Generator of daily log file names with strftime format. * Usages: * auto sink = * std::make_shared<spdlog::sinks::daily_file_format_sink_mt>("myapp-%Y-%m-%d:%H:%M:%S.log", hour, * minute);" auto logger = spdlog::daily_logger_format_mt("loggername, "myapp-%Y-%m-%d:%X...
bool file_exists(const filename_t &filename) SPDLOG_NOEXCEPT; // Return file size according to open FILE* object 55 changes: 50 additions & 5 deletions 55 include/spdlog/sinks/daily_file_sink.h Original file line numberDiff line numberDiff line change @@ -36,26 +36,38 @@ struct dail...
#include "spdlog/sinks/daily_file_sink.h" #include < chrono > using namespace std; int main() { int hours = 1; int minutes = 0; auto logger = spdlog::daily_logger_mt("logger_name", "filename.log", hours, minutes); spdlog::flush_every(std::chrono::seconds(1)); ...
After nine nights of rioting on the drab sink estates of suburban Paris, the spread of trouble to the fringes of the elegant city centre was perhaps the development France most dreaded. It would be false to suggest that the French have not been shocked by the daily images of burning cars ...