|
|
@ -85,14 +85,14 @@ namespace Inferno { |
|
|
|
|
|
|
|
|
|
|
|
class DebugLogStream final : public BufferedLogStream { |
|
|
|
class DebugLogStream final : public BufferedLogStream { |
|
|
|
public: |
|
|
|
public: |
|
|
|
DebugLogStream(): |
|
|
|
DebugLogStream() |
|
|
|
m_newline(true), m_type(Log::None) {} |
|
|
|
: m_newline(true), m_type(Log::None) {} |
|
|
|
DebugLogStream(bool newline): |
|
|
|
DebugLogStream(bool newline) |
|
|
|
m_newline(newline), m_type(Log::None) {} |
|
|
|
: m_newline(newline), m_type(Log::None) {} |
|
|
|
DebugLogStream(Log type): |
|
|
|
DebugLogStream(Log type) |
|
|
|
m_newline(true), m_type(type) { color(); } |
|
|
|
: m_newline(true), m_type(type) { color(); } |
|
|
|
DebugLogStream(Log type, bool newline): |
|
|
|
DebugLogStream(Log type, bool newline) |
|
|
|
m_newline(newline), m_type(type) { color(); } |
|
|
|
: m_newline(newline), m_type(type) { color(); } |
|
|
|
virtual ~DebugLogStream() override; |
|
|
|
virtual ~DebugLogStream() override; |
|
|
|
|
|
|
|
|
|
|
|
void color() const; |
|
|
|
void color() const; |
|
|
@ -102,6 +102,18 @@ namespace Inferno { |
|
|
|
Log m_type; |
|
|
|
Log m_type; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class StringLogStream final : public BufferedLogStream { |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
StringLogStream(std::string* fill) |
|
|
|
|
|
|
|
: m_fill(fill) {} |
|
|
|
|
|
|
|
virtual ~StringLogStream() override; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
std::string* m_fill; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
const LogStream& operator<<(const LogStream& stream, const char* value); |
|
|
|
const LogStream& operator<<(const LogStream& stream, const char* value); |
|
|
@ -209,6 +221,10 @@ namespace Inferno { |
|
|
|
dbgln(type, newline, format.data(), value, std::forward<P>(parameters)...); |
|
|
|
dbgln(type, newline, format.data(), value, std::forward<P>(parameters)...); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StringLogStream str(std::string* fill); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // LOG_H
|
|
|
|
#endif // LOG_H
|
|
|
|