mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Clang format sort includes
This commit is contained in:
@@ -47,8 +47,7 @@ set(SPDLOG_UTESTS_SOURCES
|
||||
test_ringbuffer_sink.cpp
|
||||
test_source_location.cpp
|
||||
test_log_level.cpp
|
||||
test_include_sinks.cpp
|
||||
)
|
||||
test_include_sinks.cpp)
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SPDLOG_UTESTS_SOURCES test_eventlog.cpp)
|
||||
|
@@ -9,28 +9,30 @@
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/async.h"
|
||||
#include "spdlog/details/fmt_helper.h"
|
||||
#include "spdlog/pattern_formatter.h"
|
||||
#include "spdlog/sinks/basic_file_sink.h"
|
||||
#include "spdlog/sinks/daily_file_sink.h"
|
||||
#include "spdlog/sinks/msvc_sink.h"
|
||||
#include "spdlog/sinks/null_sink.h"
|
||||
#include "spdlog/sinks/ostream_sink.h"
|
||||
#include "spdlog/sinks/rotating_file_sink.h"
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
#include "spdlog/sinks/msvc_sink.h"
|
||||
#include "spdlog/pattern_formatter.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
#include "spdlog/fmt/bin_to_hex.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
TEST_CASE("to_hex", "[to_hex]") {
|
||||
std::ostringstream oss;
|
||||
|
@@ -1,9 +1,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
#include "spdlog/cfg/env.h"
|
||||
#include "spdlog/cfg/argv.h"
|
||||
#include "spdlog/cfg/env.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
using spdlog::cfg::load_argv_levels;
|
||||
using spdlog::cfg::load_env_levels;
|
||||
|
@@ -3,10 +3,10 @@
|
||||
* https://raw.githubusercontent.com/gabime/spdlog/master/LICENSE
|
||||
*/
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
#include "spdlog/sinks/callback_sink.h"
|
||||
#include "spdlog/async.h"
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/sinks/callback_sink.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
TEST_CASE("custom_callback_logger", "[custom_callback_logger]") {
|
||||
std::vector<std::string> lines;
|
||||
|
@@ -2,10 +2,10 @@
|
||||
* This content is released under the MIT License as specified in
|
||||
* https://raw.githubusercontent.com/gabime/spdlog/master/LICENSE
|
||||
*/
|
||||
#include "includes.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#define SIMPLE_LOG "test_logs/simple_log.txt"
|
||||
#define SIMPLE_ASYNC_LOG "test_logs/simple_async_log.txt"
|
||||
|
||||
|
@@ -1,8 +1,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
#include "spdlog/sinks/win_eventlog_sink.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
static const LPCSTR TEST_SOURCE = "spdlog_test";
|
||||
|
||||
@@ -70,5 +69,3 @@ TEST_CASE("eventlog", "[eventlog]") {
|
||||
test_single_print([&test_logger](std::string const &msg) { test_logger.critical(msg); },
|
||||
"my critical message", EVENTLOG_ERROR_TYPE);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -20,6 +20,6 @@
|
||||
#include "spdlog/sinks/udp_sink.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "spdlog/sinks/wincolor_sink.h"
|
||||
#include "spdlog/sinks/win_eventlog_sink.h"
|
||||
#include "spdlog/sinks/win_eventlog_sink.h"
|
||||
#include "spdlog/sinks/wincolor_sink.h"
|
||||
#endif
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
TEST_CASE("test_default_level", "[log_level]") {
|
||||
auto test_sink = std::make_shared<spdlog::sinks::test_sink_st>();
|
||||
REQUIRE(test_sink->log_level() == spdlog::level::trace);
|
||||
|
@@ -5,13 +5,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "spdlog/details/null_mutex.h"
|
||||
#include "spdlog/sinks/base_sink.h"
|
||||
#include "spdlog/fmt/fmt.h"
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include "spdlog/details/null_mutex.h"
|
||||
#include "spdlog/fmt/fmt.h"
|
||||
#include "spdlog/sinks/base_sink.h"
|
||||
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* https://raw.githubusercontent.com/gabime/spdlog/master/LICENSE
|
||||
*/
|
||||
#include "includes.h"
|
||||
#include "spdlog/sinks/stdout_sinks.h"
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
#include "spdlog/sinks/stdout_sinks.h"
|
||||
TEST_CASE("stdout_st", "[stdout]") {
|
||||
auto l = spdlog::stdout_logger_st("test");
|
||||
l->set_pattern("%+");
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
#include "spdlog/stopwatch.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
TEST_CASE("stopwatch1", "[stopwatch]") {
|
||||
using std::chrono::milliseconds;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "includes.h"
|
||||
#include "test_sink.h"
|
||||
#include "spdlog/async.h"
|
||||
#include "test_sink.h"
|
||||
|
||||
TEST_CASE("time_point1", "[time_point log_msg]") {
|
||||
std::shared_ptr<spdlog::sinks::test_sink_st> test_sink(new spdlog::sinks::test_sink_st);
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
void prepare_logdir() {
|
||||
|
Reference in New Issue
Block a user