2019-03-24 00:40:27 +02:00
|
|
|
//
|
|
|
|
// Copyright(c) 2015 Gabi Melman.
|
|
|
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
2019-05-12 17:05:14 +03:00
|
|
|
|
2019-03-24 00:40:27 +02:00
|
|
|
// spdlog usage example
|
|
|
|
|
2019-05-12 00:34:55 +03:00
|
|
|
#include <cstdio>
|
|
|
|
|
2019-08-22 19:58:49 +03:00
|
|
|
void stdout_logger_example();
|
|
|
|
void basic_example();
|
|
|
|
void rotating_example();
|
|
|
|
void daily_example();
|
|
|
|
void async_example();
|
|
|
|
void binary_example();
|
|
|
|
void trace_example();
|
|
|
|
void multi_sink_example();
|
|
|
|
void user_defined_example();
|
|
|
|
void err_handler_example();
|
|
|
|
void syslog_example();
|
|
|
|
void clone_example();
|
|
|
|
|
2019-05-12 00:32:57 +03:00
|
|
|
#include "spdlog/spdlog.h"
|
2019-08-22 19:58:49 +03:00
|
|
|
|
|
|
|
int main(int, char *[])
|
|
|
|
{
|
|
|
|
|
2019-08-26 00:56:05 +03:00
|
|
|
// Backtrace support of latest debug/trace messages
|
2019-08-25 17:25:06 +03:00
|
|
|
spdlog::enable_backtrace(16);
|
2019-08-26 19:59:16 +03:00
|
|
|
|
2019-08-23 02:45:35 +03:00
|
|
|
spdlog::trace("Backtrace message 1");
|
|
|
|
spdlog::debug("Backtrace message 2");
|
2019-08-26 19:59:16 +03:00
|
|
|
spdlog::info("Hello");
|
2019-08-25 17:27:21 +03:00
|
|
|
spdlog::dump_backtrace();
|
2019-08-26 19:59:16 +03:00
|
|
|
}
|