line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
#include |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
namespace xs { |
5
|
|
|
|
|
|
|
template <> struct Typemap : TypemapBase { |
6
|
|
|
|
|
|
|
static MultiLogger::Channel in (const Hash& h) { |
7
|
|
|
|
|
|
|
auto ret = MultiLogger::Channel(xs::in(h.fetch("logger"))); |
8
|
|
|
|
|
|
|
Sv val; |
9
|
|
|
|
|
|
|
if ((val = h.fetch("min_level"))) ret.min_level = xs::in(val); |
10
|
|
|
|
|
|
|
if ((val = h.fetch("formatter"))) ret.formatter = xs::in(val); |
11
|
|
|
|
|
|
|
if ((val = h.fetch("format")) && val.defined()) { |
12
|
|
|
|
|
|
|
auto fmt = xs::in(val); |
13
|
|
|
|
|
|
|
if (fmt.length()) ret.formatter = new PatternFormatter(fmt); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
return ret; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
20
|
|
|
|
|
|
|
static string package () { return "XLog::Multi"; } |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
MODULE = XLog PACKAGE = XLog::Multi |
25
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
BOOT { |
28
|
8
|
50
|
|
|
|
|
Stash(__PACKAGE__).inherit("XLog::ILogger"); |
|
|
50
|
|
|
|
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
4
|
|
|
|
|
|
MultiLogger* MultiLogger::new (MultiLogger::Channels list) |