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

Method log

examples/logger_custom_output_ex.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 void log (
31 const string& logger_name,
32 const log_level& ll,
33 const uint64 thread_id,
34 const char* message_to_log
35 )
36 {
37 // Log all messages from any logger to our log file.
38 fout << ll << " ["<<thread_id<<"] " << logger_name << ": " << message_to_log << endl;
39
40 // But only log messages that are of LINFO priority or higher to the console.
41 if (ll >= LINFO)
42 cout << ll << " ["<<thread_id<<"] " << logger_name << ": " << message_to_log << endl;
43 }
44
45private:
46 ofstream fout;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected