You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spdlog/spdlite/example/create_logger.cpp

17 lines
455 B
C++

7 years ago
// Copyright(c) 2015-present Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include "spdlite/spdlite.h"
7 years ago
#include "spdlog/spdlog.h"
7 years ago
#include "spdlog/sinks/basic_file_sink.h"
7 years ago
7 years ago
7 years ago
#define UNUSED(x) (void)(x)
// example of creating lite logger with console and file sink
7 years ago
spdlite::logger create_logger(void *ctx)
7 years ago
{
7 years ago
UNUSED(ctx);
7 years ago
return spdlite::logger(spdlog::basic_logger_mt("logger-name", "log.txt", true));
7 years ago
}