refact(ll-box): let loglevel effect syslog
Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
parent
8a36030481
commit
d223aea48c
|
|
@ -43,6 +43,10 @@ public:
|
|||
|
||||
~Logger()
|
||||
{
|
||||
if (level < LOGLEVEL) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string prefix;
|
||||
auto pid_ns = GetPidnsPid();
|
||||
int syslogLevel = LOG_DEBUG;
|
||||
|
|
@ -64,9 +68,7 @@ public:
|
|||
break;
|
||||
}
|
||||
syslog(syslogLevel, "%s|%s:%d %s", pid_ns.c_str(), function, line, ss.str().c_str());
|
||||
if (level < LOGLEVEL) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (level) {
|
||||
case Debug:
|
||||
prefix = "[DBG |";
|
||||
|
|
|
|||
Loading…
Reference in New Issue