unsigned char data[MAX_INT_STRLEN + 6 + 1 + 3];
buffer_t buf;
+ if ((rstream->flags & IOSTREAM_RAWLOG_FLAG_TIMESTAMP) == 0)
+ return 0;
+
buffer_create_from_data(&buf, data, sizeof(data));
str_printfa(&buf, "%lu.%06u ",
(unsigned long)ioloop_timeval.tv_sec,
old_input = *input;
old_output = *output;
+
*input = i_stream_create_rawlog(old_input, in_path, in_fd,
- IOSTREAM_RAWLOG_FLAG_AUTOCLOSE);
+ IOSTREAM_RAWLOG_FLAG_AUTOCLOSE |
+ IOSTREAM_RAWLOG_FLAG_TIMESTAMP);
*output = o_stream_create_rawlog(old_output, out_path, out_fd,
- IOSTREAM_RAWLOG_FLAG_AUTOCLOSE);
+ IOSTREAM_RAWLOG_FLAG_AUTOCLOSE |
+ IOSTREAM_RAWLOG_FLAG_TIMESTAMP);
i_stream_unref(&old_input);
o_stream_unref(&old_output);
return 0;
old_input = *input;
old_output = *output;
*input = i_stream_create_rawlog(old_input, path, fd,
- IOSTREAM_RAWLOG_FLAG_BUFFERED);
+ IOSTREAM_RAWLOG_FLAG_BUFFERED |
+ IOSTREAM_RAWLOG_FLAG_TIMESTAMP);
*output = o_stream_create_rawlog(old_output, path, fd,
IOSTREAM_RAWLOG_FLAG_AUTOCLOSE |
- IOSTREAM_RAWLOG_FLAG_BUFFERED);
+ IOSTREAM_RAWLOG_FLAG_BUFFERED |
+ IOSTREAM_RAWLOG_FLAG_TIMESTAMP);
i_stream_unref(&old_input);
o_stream_unref(&old_output);
return 0;