Append LDP headers to the buffer.
- Returns
- *this
- Exceptions
-
- Note
- The appended headers are for:
-
executable absolute path
-
process ID
-
thread ID
-
timestamp (in microseconds)
Each header is formatted as 'name: value\r\n'. All the numeric values are hexadecimal. In LDP, the header section is terminated with a double \r\n followed by the message body (trace data). This method just appends the four headers (not the extra \r\n delimiter) to allow for custom headers before the trace data (exception headers, custom OEM headers e.t.c)
Definition at line 248 of file streambuf.cpp.
References csdbg::string::append(), and csdbg::util::exec_path().
253 gettimeofday(&now, NULL);
254 u64 tstamp =
static_cast<u64> (now.tv_sec) * 10e+5 + now.tv_usec;
257 append(
"path: %s\r\n", path);
258 append(
"pid: %x\r\n", getpid());
259 append(
"tid: %lx\r\n", pthread_self());
260 append(
"tstamp: %lx\r\n", tstamp);
virtual string & append(const string &)
Append a string.
static const i8 * exec_path()
Get the absolute path of the executable.
char i8
8-bit signed integer
unsigned long long u64
64-bit unsigned integer