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

Function set_all_logging_output_streams

dlib/logger/logger_kernel_1.cpp:15–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13// ----------------------------------------------------------------------------------------
14
15 void set_all_logging_output_streams (
16 std::ostream& out_
17 )
18 {
19 logger::global_data& gd = logger::get_global_data();
20 auto_mutex M(gd.m);
21 gd.loggers.reset();
22 while (gd.loggers.move_next())
23 {
24 gd.loggers.element()->out.rdbuf(out_.rdbuf());
25 gd.loggers.element()->hook.clear();
26 }
27
28 gd.set_output_stream("",out_);
29
30 // set the default hook to be an empty member function pointer
31 logger::hook_mfp hook;
32 gd.set_output_hook("",hook);
33 }
34
35 void set_all_logging_levels (
36 const log_level& new_level

Callers 2

mainFunction · 0.85

Calls 5

set_output_streamMethod · 0.80
set_output_hookMethod · 0.80
resetMethod · 0.45
move_nextMethod · 0.45
clearMethod · 0.45

Tested by 1

mainFunction · 0.68