src: improvements to logging
* log messages as they are sent and received * log information about messages by overriding method print() * reduced logging of autocompletion list * removed log location from message and parsing logs, as they are known and make up 90% of logs
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#ifndef MESSAGE_BASE_H
|
||||
#define MESSAGE_BASE_H
|
||||
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
|
||||
class MessageBase
|
||||
{
|
||||
@@ -58,6 +59,16 @@ public:
|
||||
return m_keepContent;
|
||||
}
|
||||
|
||||
virtual void print(std::ostream& os) const = 0;
|
||||
|
||||
std::string str() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << getType() << " ";
|
||||
print(ss);
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
UndoType undoRedoType;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user