Merge lp:~vanvugt/mir/logtime into lp:mir
Proposed by
Daniel van Vugt
Status: | Merged |
---|---|
Approved by: | kevin gunn |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1288 |
Proposed branch: | lp:~vanvugt/mir/logtime |
Merge into: | lp:mir |
Diff against target: |
34 lines (+17/-2) 1 file modified
src/shared/logging/dumb_console_logger.cpp (+17/-2) |
To merge this branch: | bzr merge lp:~vanvugt/mir/logtime |
Related bugs: | |
Related blueprints: |
Mir related performance items
(Undefined)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Kevin DuBois (community) | Approve | ||
Alexandros Frantzis (community) | Approve | ||
Alan Griffiths | Needs Information | ||
Andreas Pokorny (community) | Approve | ||
Review via email:
|
Commit message
Logging: Add timestamps to log messages and change the prefix format to be
more like that of kernel/Xorg logs:
[seconds.
Importantly, the timestamps are consistent system-wide so you can compare
them between different processes, concatenate logs from different processes,
and sort the result into meaningful output.
To post a comment you must log in.
The display of the timestamp can be written more idiomatically and more safely (since we avoid the manual conversion) as:
auto secs = duration_ cast<duration< double> >(system_ clock:: now().time_ since_epoch( )); old_flags) ;
auto old_flags = out.flags();
out << std::fixed << secs.count() << std::endl;
out.setf(