3#include <iguana/services/Logger.h>
8 std::vector<iguana::Logger> logs;
9 logs.push_back({
"styled_logger", iguana::Logger::Level::trace});
10 logs.push_back({
"unstyled_logger", iguana::Logger::Level::trace});
13 logs.at(0).EnableStyle();
14 logs.at(1).DisableStyle();
19 logs.at(0).SetLevel(
"non_existent_level");
21 for(
auto& log : logs) {
23 log.Trace(
"trace is level {}",
static_cast<int>(iguana::Logger::Level::trace));
24 log.Debug(
"debug is level {}",
static_cast<int>(iguana::Logger::Level::debug));
25 log.Info(
"info is level {}",
static_cast<int>(iguana::Logger::Level::info));
26 log.Warn(
"warn is level {}",
static_cast<int>(iguana::Logger::Level::warn));
27 log.Error(
"error is level {}",
static_cast<int>(iguana::Logger::Level::error));
31 log.SetLevel(
"silent");
32 log.Error(
"if this prints, 'silent' level failed");
33 log.SetLevel(
"trace");
35 log.Info(
"too many arguments: {}", 1, 2);
37 log.Info(
"too few arguments: {} {}", 1);
39 catch(std::exception
const& ex) {
40 log.Info(
"too few arguments test threw expected exception");