Search code examples
c++spdlog

query the spdlog logger name


say we build our spdlog object as the following?

logger = std::make_shared<spdlog::logger>("some name", sink_list.begin(), sink_list.end());

Is there a method such as logger->get_name() or anything else that would return "some name"


Solution

  • Is there a method such as logger->get_name() or anything else that would return "some name"

    There is.

    logger->name()
    

    (source)