16 va_start(list, command);
21 int state = va_arg(list,
int);
22 maxLevel =
new(std::nothrow)
int;
28 *maxLevel = log->getMaxLevel();
29 if(state >= LEV_EMERG && state <= LEV_DEBUG)
31 log->setMaxLevel(state);
35 setError(2,
"Wrong level, value must be between 0 and 7");
41 int mask = va_arg(list,
int);
42 maxLevel =
new(std::nothrow)
int;
48 *maxLevel = log->getLevelMask();
49 if(mask <= 0xff)log->setLevelMask((u_int8_t)mask);
54 int level = va_arg(list,
int);
55 if(level >= LEV_EMERG && level <= LEV_DEBUG)
58 char *
data = log->getLastLog(level, errNo);
59 if(!data)data = strdup(
"");
60 char *ret =
new(std::nothrow)
char[strlen(data) + 1 +
sizeof(int)];
67 memcpy(ret +
sizeof(
int), data, strlen(data) + 1);
73 setError(2,
"Wrong level, value must be between 0 and 7");