Welcome to mirror list, hosted at ThFree Co, Russian Federation.

example.cpp « example - github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1d01b0ae72615809beb48aeece9f6958f3952629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)

// spdlog usage example

#include <cstdio>

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();

#include "spdlog/spdlog.h"

int main(int, char *[])
{

    // Backtrace support of latest debug/trace messages
    spdlog::enable_backtrace(16);

    spdlog::trace("Backtrace message 1");
    spdlog::debug("Backtrace message 2");
    spdlog::info("Hello");
    spdlog::dump_backtrace();
}