2019-03-30 07:53:02 -04:00
|
|
|
// Copyright(c) 2015-present Gabi Melman.
|
|
|
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
|
|
|
|
2019-03-30 09:49:02 -04:00
|
|
|
#include "spdlite/spdlite.h"
|
2019-03-23 07:31:57 -04:00
|
|
|
#include "spdlog/spdlog.h"
|
2019-03-23 13:34:50 -04:00
|
|
|
#include "spdlog/sinks/basic_file_sink.h"
|
2019-03-30 07:53:02 -04:00
|
|
|
|
2019-03-23 13:34:50 -04:00
|
|
|
|
2019-03-23 19:18:05 -04:00
|
|
|
#define UNUSED(x) (void)(x)
|
|
|
|
|
|
|
|
// example of creating lite logger with console and file sink
|
2019-03-30 06:49:54 -04:00
|
|
|
spdlite::logger create_logger(void *ctx)
|
2019-03-23 07:31:57 -04:00
|
|
|
{
|
2019-03-23 19:18:05 -04:00
|
|
|
UNUSED(ctx);
|
2019-03-30 07:53:02 -04:00
|
|
|
return spdlite::logger(spdlog::basic_logger_mt("logger-name", "log.txt", true));
|
2019-03-23 07:31:57 -04:00
|
|
|
}
|