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/example/example.cpp

34 lines
786 B
C++

7 years ago
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
7 years ago
// spdlog usage example
6 years ago
#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();
#include <spdlog/spdlog.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/loaders/env.h>
#include <spdlog/loaders/argv.h>
6 years ago
6 years ago
int main(int args, char *argv[])
6 years ago
{
6 years ago
spdlog::loaders::load_env();
spdlog::loaders::load_argv(args, argv);
spdlog::info("HELLO INFO");
6 years ago
auto l1 = spdlog::stderr_color_st("l1");
l1->trace("L1 TRACE");
}