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

Function print_datetime_logger_header

dlib/logger/extra_logger_headers.cpp:15–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13{
14
15 void print_datetime_logger_header (
16 std::ostream& out,
17 const std::string& logger_name,
18 const log_level& l,
19 const uint64 thread_id
20 )
21 {
22 using namespace std;
23 char* buf;
24
25 time_t t = time(0);
26 buf = ctime(&t);
27 // remove the trailing '\n'
28 size_t size = strlen(buf);
29 buf[size-1] = '\0';
30
31 out << l.name << " (" << buf << ") [" << thread_id << "] " << logger_name << ": ";
32 }
33
34}
35

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected