MCPcopy Create free account
hub / github.com/ceph/ceph / TEST

Function TEST

src/log/test.cc:20–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18using namespace ceph::logging;
19
20TEST(Log, Simple)
21{
22 SubsystemMap subs;
23 subs.set_log_level(0, 10);
24 subs.set_gather_level(0, 10);
25
26 subs.set_log_level(1, 20);
27 subs.set_gather_level(1, 1);
28
29 subs.set_log_level(2, 20);
30 subs.set_gather_level(2, 2);
31
32 subs.set_log_level(3, 10);
33 subs.set_gather_level(3, 3);
34
35 Log log(&subs);
36 log.start();
37
38 log.set_log_file("foo");
39 log.reopen_log_file();
40
41 log.set_stderr_level(5, -1);
42
43
44 for (int i=0; i<100; i++) {
45 int sys = i % 4;
46 int l = 5 + (i%4);
47 if (subs.should_gather(sys, l)) {
48 MutableEntry e(l, sys);
49 log.submit_entry(std::move(e));
50 }
51 }
52
53 log.flush();
54
55 log.dump_recent();
56
57 log.stop();
58}
59
60TEST(Log, ReuseBad)
61{

Callers

nothing calls this directly

Calls 15

MutableEntryClass · 0.85
pipeFunction · 0.85
readpipeFunction · 0.85
do_segvFunction · 0.85
append_timeFunction · 0.85
set_gather_levelMethod · 0.80
set_log_fileMethod · 0.80
reopen_log_fileMethod · 0.80
set_stderr_levelMethod · 0.80
should_gatherMethod · 0.80
dump_recentMethod · 0.80
set_stderr_fdMethod · 0.80

Tested by

no test coverage detected