2019-03-24 06:40:27 +08:00
|
|
|
//
|
|
|
|
// Copyright(c) 2015 Gabi Melman.
|
|
|
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
2019-05-12 22:05:14 +08:00
|
|
|
|
2019-03-24 06:40:27 +08:00
|
|
|
// spdlog usage example
|
|
|
|
|
2019-12-13 22:17:09 +08:00
|
|
|
#include <cstdio>
|
2021-09-04 01:53:29 +08:00
|
|
|
#include <chrono>
|
2019-12-13 22:17:09 +08:00
|
|
|
|
2024-11-30 23:11:18 +08:00
|
|
|
#include "spdlog/spdlite.h"
|
2020-09-26 20:30:45 +08:00
|
|
|
#include "spdlog/sinks/stdout_color_sinks.h"
|
2021-12-01 22:37:48 +08:00
|
|
|
|
2024-11-30 23:11:18 +08:00
|
|
|
int main(int, char *[]) {
|
|
|
|
spdlog::lite_logger logger("console", {std::make_shared<spdlog::sinks::stdout_color_sink_mt>()});
|
|
|
|
logger.info("Hello {} {} !!", "param1", 123.4);
|
|
|
|
logger.warn("Some warning message");
|
2024-04-30 18:11:01 +08:00
|
|
|
|
2024-09-13 03:27:25 +08:00
|
|
|
|
2024-11-30 23:11:18 +08:00
|
|
|
}
|