Files
CppNet/common/log/stdout_logger.h
2021-04-07 18:45:00 +08:00

31 lines
641 B
C++

// Use of this source code is governed by a BSD 3-Clause License
// that can be found in the LICENSE file.
// Author: caozhiyi (caozhiyi5@gmail.com)
#ifndef QUIC_COMMON_LOG_STDOUT_LOGGER
#define QUIC_COMMON_LOG_STDOUT_LOGGER
#include <mutex>
#include "logger_interface.h"
namespace cppnet {
class StdoutLogger: public Logger {
public:
StdoutLogger();
~StdoutLogger();
void Debug(std::shared_ptr<Log>& log);
void Info(std::shared_ptr<Log>& log);
void Warn(std::shared_ptr<Log>& log);
void Error(std::shared_ptr<Log>& log);
void Fatal(std::shared_ptr<Log>& log);
private:
std::mutex _mutex;
};
}
#endif