Fix timestamp not showing on every message at STDOUT
This commit is contained in:
parent
2fb1bfadfc
commit
c1dc11fe4e
|
@ -95,7 +95,8 @@ namespace gr
|
|||
if(d_timestamp) {
|
||||
std::time_t t = std::time(nullptr);
|
||||
std::tm tm = *std::localtime(&t);
|
||||
d_fos << "[" << strftime(buf, sizeof(buf), "%F %T %z", &tm) << "]";
|
||||
strftime(buf, sizeof(buf), "%F %T %z", &tm);
|
||||
std::cout << "[" << buf << "]";
|
||||
}
|
||||
|
||||
switch (d_format)
|
||||
|
|
Loading…
Reference in New Issue