#include #include "p2LoggerWrapper.h" #include "logger.h" P2LoggerWrapper::P2LoggerWrapper(const std::string & p) : prefix(p) { } void P2LoggerWrapper::print(const std::string & message) { ::Logger()->messagebf(LOG_INFO, "%s: %s", prefix, message); } void P2LoggerWrapper::trace(const std::string & cat, const std::string & message) { ::Logger()->messagebf(LOG_DEBUG, "%s: [%s] %s", prefix, cat, message); } void P2LoggerWrapper::warning(const std::string & message) { ::Logger()->messagebf(LOG_WARNING, "%s: %s", prefix, message); } void P2LoggerWrapper::error(const std::string & message) { ::Logger()->messagebf(LOG_ERR, "%s: %s", prefix, message); } Ice::LoggerPtr P2LoggerWrapper::cloneWithPrefix(const std::string & p) { return new P2LoggerWrapper(prefix + "-" + p); }