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