spdlog/lite-example/create_logger.cpp

15 lines
370 B
C++
Raw Normal View History

2019-03-23 23:25:50 +08:00
#include "spdlite.h"
2019-03-23 19:31:57 +08:00
#include "spdlog/spdlog.h"
2019-03-24 01:34:50 +08:00
#include "spdlog/sinks/basic_file_sink.h"
#include "spdlog/sinks/stdout_color_sinks.h"
2019-03-30 18:49:54 +08:00
#include "spdlog/sinks/stdout_sinks.h"
2019-03-24 01:34:50 +08:00
2019-03-24 07:18:05 +08:00
#define UNUSED(x) (void)(x)
// example of creating lite logger with console and file sink
2019-03-30 18:49:54 +08:00
spdlite::logger create_logger(void *ctx)
2019-03-23 19:31:57 +08:00
{
2019-03-24 07:18:05 +08:00
UNUSED(ctx);
2019-03-30 18:49:54 +08:00
return spdlite::default_logger();
2019-03-23 19:31:57 +08:00
}