mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 14:42:13 +08:00
Update example
This commit is contained in:
parent
a6d8b52686
commit
b24ef39b9d
@ -41,6 +41,14 @@ int main(int, char *[])
|
|||||||
spdlog::info("This an info message with custom format");
|
spdlog::info("This an info message with custom format");
|
||||||
spdlog::set_pattern("%+"); // back to default format
|
spdlog::set_pattern("%+"); // back to default format
|
||||||
|
|
||||||
|
// Backtrace support.
|
||||||
|
// Auto trigger backtrace of latest debug/trace messages upon when error/critical messages happen..
|
||||||
|
spdlog::enable_backtrace();
|
||||||
|
spdlog::trace("Backtrace message 1");
|
||||||
|
spdlog::debug("Backtrace message 2");
|
||||||
|
spdlog::debug("Backtrace message 3");
|
||||||
|
spdlog::error("This should trigger backtrace!")
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stdout_logger_example();
|
stdout_logger_example();
|
||||||
|
Loading…
Reference in New Issue
Block a user