admin管理员组

文章数量:1279008

I try to stop the logging before app graceful shutdown, but spdlog::get function throws access violation.

void stopLog()
{
    auto log = spdlog::get("app"); //access violation happens here
    log->critical("app ends");
    log->flush();
    spdlog::shutdown();
}
//calling the stoplog to close logging
MainComponent::~MainComponent()
{
    stopLog();
}

本文标签: cspdlogget(quotappquot) fails when closing the logsStack Overflow