Added support for setting "debug level N+" or "debug level N-"
git-svn-id: http://voip.null.ro/svn/yate@6226 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
1b7ab47d5a
commit
d407212682
|
@ -1011,6 +1011,14 @@ bool Channel::setDebug(Message& msg)
|
|||
if (str.startSkip("level")) {
|
||||
int dbg = debugLevel();
|
||||
str >> dbg;
|
||||
if (str == "+") {
|
||||
if (debugLevel() > dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
else if (str == "-") {
|
||||
if (debugLevel() < dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
debugLevel(dbg);
|
||||
}
|
||||
else if (str == "reset")
|
||||
|
@ -1308,6 +1316,14 @@ bool Module::setDebug(Message& msg, const String& target)
|
|||
if (str.startSkip("level")) {
|
||||
int dbg = debugLevel();
|
||||
str >> dbg;
|
||||
if (str == "+") {
|
||||
if (debugLevel() > dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
else if (str == "-") {
|
||||
if (debugLevel() < dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
debugLevel(dbg);
|
||||
}
|
||||
else if (str == "reset") {
|
||||
|
|
|
@ -1265,6 +1265,14 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co
|
|||
if (op->startSkip("level")) {
|
||||
int dbg = debugLevel();
|
||||
*op >> dbg;
|
||||
if (*op == "+") {
|
||||
if (debugLevel() > dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
else if (*op == "-") {
|
||||
if (debugLevel() < dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
debugLevel(dbg);
|
||||
}
|
||||
else if (*op == "reset")
|
||||
|
|
|
@ -1503,6 +1503,14 @@ bool Connection::processLine(const char *line, bool saveLine)
|
|||
if (str.startSkip("level")) {
|
||||
int dbg = debugLevel();
|
||||
str >> dbg;
|
||||
if (str.startSkip("+")) {
|
||||
if (debugLevel() > dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
else if (str.startSkip("-")) {
|
||||
if (debugLevel() < dbg)
|
||||
dbg = debugLevel();
|
||||
}
|
||||
debugLevel(dbg);
|
||||
}
|
||||
NamedCounter* counter = 0;
|
||||
|
|
Loading…
Reference in New Issue