mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
a9fb96e088
2. Improved file_helper::exists() performance under linux to use stat sys call 3. Added unit tests
23 lines
400 B
C++
23 lines
400 B
C++
#pragma once
|
|
|
|
#include <cstdio>
|
|
#include <fstream>
|
|
#include <string>
|
|
#include <ostream>
|
|
#include <chrono>
|
|
#include <exception>
|
|
|
|
#include "catch.hpp"
|
|
#include "../include/spdlog/spdlog.h"
|
|
#include "../include/spdlog/sinks/null_sink.h"
|
|
|
|
|
|
static void prepare_logdir()
|
|
{
|
|
spdlog::drop_all();
|
|
#ifdef _WIN32
|
|
auto rv = system("del /F /Q logs\\*");
|
|
#else
|
|
auto rv = system("rm -f logs/*");
|
|
#endif
|
|
} |