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