Molybden API
Loading...
Searching...
No Matches
log_message.hpp
1// Copyright (c) 2000-2023 TeamDev Ltd. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#include "log_level.hpp"
6
7#include <sstream>
8
9#ifndef MOLYBDEN_LOG_MESSAGE_HPP
10#define MOLYBDEN_LOG_MESSAGE_HPP
11
12namespace molybden {
13namespace internal {
14
19class LogMessage {
20 public:
21 LogMessage(const char* file, int line, LogLevel severity);
22
23 ~LogMessage();
24
25 template <typename _msg>
26 LogMessage& operator << (_msg&& msg) {
27 stream_ << msg;
28 return *this;
29 }
30
31 std::stringstream stream_;
32 const char* file_;
33 int line_;
34 LogLevel severity_;
35};
36
37} // namespace internal
38} // namespace molybden
39
40#endif // MOLYBDEN_LOG_MESSAGE_HPP