[ox/trace] Add delimiter setter to trace handlers

This commit is contained in:
Gary Talent 2018-09-01 21:52:26 -05:00
parent cbfd9566d1
commit 6648d941c9

View File

@ -56,6 +56,7 @@ class OutStream {
class StdOutStream {
private:
const char *m_delimiter = " ";
TraceMsg m_msg;
public:
@ -67,11 +68,19 @@ class StdOutStream {
template<typename T>
constexpr inline StdOutStream &operator<<(const T &v) {
m_msg.msg += " ";
m_msg.msg += m_delimiter;
m_msg.msg += v;
return *this;
}
/**
* del sets the delimiter between log segments.
*/
inline StdOutStream &del(const char *delimiter) {
m_delimiter = delimiter;
return *this;
}
};
@ -90,6 +99,10 @@ class NullStream {
return *this;
}
inline NullStream &del(const char*) {
return *this;
}
};
#ifdef DEBUG