Commit 4f98b000 authored by gabime's avatar gabime

Fixed example

parent b5d61b96
...@@ -35,6 +35,7 @@ int main(int, char *[]) ...@@ -35,6 +35,7 @@ int main(int, char *[])
spdlog::debug("This message should not be displayed!"); spdlog::debug("This message should not be displayed!");
spdlog::set_level(spdlog::level::trace); // Set specific logger's log level spdlog::set_level(spdlog::level::trace); // Set specific logger's log level
spdlog::debug("This message should be displayed.."); spdlog::debug("This message should be displayed..");
spdlog::set_level(spdlog::level::info); // Set specific logger's log level
// Customize msg format for all loggers // Customize msg format for all loggers
spdlog::set_pattern("[%H:%M:%S %z] [%^%L%$] [thread %t] %v"); spdlog::set_pattern("[%H:%M:%S %z] [%^%L%$] [thread %t] %v");
...@@ -46,8 +47,7 @@ int main(int, char *[]) ...@@ -46,8 +47,7 @@ int main(int, char *[])
spdlog::enable_backtrace(16); spdlog::enable_backtrace(16);
spdlog::trace("Backtrace message 1"); spdlog::trace("Backtrace message 1");
spdlog::debug("Backtrace message 2"); spdlog::debug("Backtrace message 2");
spdlog::debug("Backtrace message 3"); spdlog::dump_backtrace();
spdlog::error("This should trigger backtrace!");
try try
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment