Logger: added %O to message format to display numeric thread id in logs.

This commit is contained in:
Matej Kenda
2015-06-01 10:00:56 +02:00
parent f1e6cba313
commit e26bb65a5b
4 changed files with 18 additions and 0 deletions

View File

@@ -128,6 +128,9 @@ public:
long getTid() const;
/// Returns the numeric thread identifier for the message.
long getOsTid() const;
/// Returns the numeric OS thread identifier for the message.
void setPid(long pid);
/// Sets the process identifier for the message.
@@ -196,6 +199,7 @@ private:
Priority _prio;
Timestamp _time;
int _tid;
int _ostid;
std::string _thread;
long _pid;
const char* _file;
@@ -243,6 +247,12 @@ inline long Message::getTid() const
}
inline long Message::getOsTid() const
{
return _ostid;
}
inline long Message::getPid() const
{
return _pid;