MCPcopy Create free account
hub / github.com/davisking/dlib / print_default_logger_header

Function print_default_logger_header

dlib/logger/logger_kernel_1.cpp:90–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88// ----------------------------------------------------------------------------------------
89
90 void print_default_logger_header (
91 std::ostream& out,
92 const std::string& logger_name,
93 const log_level& l,
94 const uint64 thread_id
95 )
96 {
97 using namespace std;
98 static timestamper ts;
99 static const uint64 first_time = ts.get_timestamp();
100
101 const uint64 cur_time = (ts.get_timestamp() - first_time)/1000;
102 streamsize old_width = out.width(); out.width(5);
103 out << cur_time << " " << l.name;
104 out.width(old_width);
105
106 out << " [" << thread_id << "] " << logger_name << ": ";
107 }
108
109// ----------------------------------------------------------------------------------------
110// ----------------------------------------------------------------------------------------

Callers 1

helperMethod · 0.85

Calls 2

get_timestampMethod · 0.80
widthMethod · 0.45

Tested by

no test coverage detected