Skip to content
Extraits de code Groupes Projets
  • Kubat's avatar
    57576d39
    LOG: Add logger to Vivy · 57576d39
    Kubat a rédigé
    This is a slightly more complicated logger than what is done for lektor.
    The process to create a logger is the following:
    
    { // In scope
    std::shared_ptr<LogSink> mySink   = VIVY_NEW_LOG_SINK();
    std::shared_ptr<Logger> appLog    = VIVY_GET_LOGGER(mySink, "APPLICATION");
    std::shared_ptr<Logger> scriptLog = VIVY_GET_LOGGER(mySink, "SCRIPT");
    // ...
    VIVY_LOG_WARN(appLog) << "This is" << ' ' << "very usefull!";
    // ...
    } // Will clear all loggers
    LOG: Add logger to Vivy
    Kubat a rédigé
    This is a slightly more complicated logger than what is done for lektor.
    The process to create a logger is the following:
    
    { // In scope
    std::shared_ptr<LogSink> mySink   = VIVY_NEW_LOG_SINK();
    std::shared_ptr<Logger> appLog    = VIVY_GET_LOGGER(mySink, "APPLICATION");
    std::shared_ptr<Logger> scriptLog = VIVY_GET_LOGGER(mySink, "SCRIPT");
    // ...
    VIVY_LOG_WARN(appLog) << "This is" << ' ' << "very usefull!";
    // ...
    } // Will clear all loggers