Function reconfigureLogger

Summary

#include <src/easylogging++.h>

(1) static Logger * reconfigureLogger(Logger *logger, const Configurations &configurations)

(2) static Logger * reconfigureLogger(const std::string &identity, const Configurations &configurations)

(3) static Logger * reconfigureLogger(const std::string &identity, ConfigurationType configurationType, const std::string &value)

Function overload

Synopsis

#include <src/easylogging++.h>

static Logger * reconfigureLogger(Logger *logger, const Configurations &configurations)

Description

Reconfigures specified logger with new configurations.

Mentioned in

Source

Lines 2967-2971 in src/easylogging++.cc. Line 3813 in src/easylogging++.h.

Logger* Loggers::reconfigureLogger(Logger* logger, const Configurations& configurations) {
  if (!logger) return nullptr;
  logger->configure(configurations);
  return logger;
}

Synopsis

#include <src/easylogging++.h>

static Logger * reconfigureLogger(const std::string &identity, const Configurations &configurations)

Description

Reconfigures logger with new configurations after looking it up using identity.

Mentioned in

Source

Lines 2973-2975 in src/easylogging++.cc. Line 3815 in src/easylogging++.h.

Logger* Loggers::reconfigureLogger(const std::string& identity, const Configurations& configurations) {
  return Loggers::reconfigureLogger(Loggers::getLogger(identity), configurations);
}

Synopsis

#include <src/easylogging++.h>

static Logger * reconfigureLogger(const std::string &identity, ConfigurationType configurationType, const std::string &value)

Description

Reconfigures logger's single configuration.

Mentioned in

Source

Lines 2977-2986 in src/easylogging++.cc. Line 3817 in src/easylogging++.h.

Logger* Loggers::reconfigureLogger(const std::string& identity, ConfigurationType configurationType,
                                   const std::string& value) {
  Logger* logger = Loggers::getLogger(identity);
  if (logger == nullptr) {
    return nullptr;
  }
  logger->configurations()->set(Level::Global, configurationType, value);
  logger->reconfigure();
  return logger;
}





Add Discussion

Log in to comment