#include "stderrlogger.hpp" #include "common.hpp" #include #include #include "trace.hpp" #include "utils.hpp" Stderrlogger::Stderrlogger(uid_t ruid, Log_type log_type): ILogger(ruid, log_type) { TRACE_LOC_ON_MASK(LOGGING_MASK, "Built Stderrlogger with log_type = %s\n", log_type_to_str(log_type).c_str()); } Stderrlogger::~Stderrlogger() { } void Stderrlogger::log(Log_type type, const string& message, int errnum) { std::string msg_out; if(!prepare_log(type, message, msg_out, errnum)) return; bool has_color = false; if(type == LOG_TYPE_ERROR) { std::cerr<