spdlog/lite-example/example.cpp

19 lines
407 B
C++
Raw Normal View History

2019-03-23 11:25:50 -04:00
#include "spdlite.h"
2019-03-23 07:31:57 -04:00
int main()
{
2019-03-29 07:38:40 -04:00
auto l = spdlog::lite::create_logger();
2019-03-23 17:13:38 -04:00
l.set_level(spdlog::lite::level::trace);
2019-03-29 07:38:40 -04:00
l.trace_printf("Hello %s ", "GABI");
2019-03-23 19:21:07 -04:00
l.info_printf("Hello %d", 12346);
l.warn_printf("Hello %f", 12346.5656);
2019-03-23 19:23:14 -04:00
l.warn("Hello {}", "LITE :) ");
2019-03-23 19:40:20 -04:00
2019-03-29 07:38:40 -04:00
auto l2 = l.clone("logger2");
2019-03-23 19:40:20 -04:00
l2.debug("HELLO");
2019-03-29 07:38:40 -04:00
auto l3 = std::move(l);
l3.warn("HELLO FROM L3");
2019-03-23 07:31:57 -04:00
}