IRC_SERVER
By @hyunjunk (hyunjun2372@gmail.com)
Loading...
Searching...
No Matches
Log.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <sstream>
5
8
9namespace IRCCore
10{
11
12#ifdef IRCCORE_LOG_ENABLE
13 void CoreLog(const std::string& msg);
14 void CoreMemoryLog(const std::string& msg);
15 void CoreMemoryLeakLog(const std::string& msg);
16#else
17 FORCEINLINE void CoreLog(const std::string& msg) { (void)msg; }
18 FORCEINLINE void CoreMemoryLog(const std::string& msg) { (void)msg; }
19 FORCEINLINE void CoreMemoryLeakLog(const std::string& msg) { (void)msg; }
20#endif
21
22template <typename T>
23std::string ValToString(const T value)
24{
25 std::ostringstream oss;
26 oss << value;
27 return oss.str();
28}
29
30template <typename T>
31std::string ValToStringByHex(const T value)
32{
33 std::ostringstream oss;
34 oss << std::hex << value;
35 return oss.str();
36}
37
38} // namespace IRCCore
#define FORCEINLINE
Definition AttributeDefines.hpp:55
Definition ControlBlock.hpp:7
std::string ValToStringByHex(const T value)
Definition Log.hpp:31
void CoreLog(const std::string &msg)
Definition Log.hpp:17
void CoreMemoryLeakLog(const std::string &msg)
Definition Log.hpp:19
void CoreMemoryLog(const std::string &msg)
Definition Log.hpp:18
std::string ValToString(const T value)
Definition Log.hpp:23