Skip to content
Snippets Groups Projects
Commit 5cbc2fd9 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #3823: pjsip detailed logging should only be on in debug mode

parent 7b1985c2
No related branches found
No related tags found
No related merge requests found
...@@ -81,4 +81,8 @@ void setDebugMode(bool d) ...@@ -81,4 +81,8 @@ void setDebugMode(bool d)
debugMode = d; debugMode = d;
} }
bool getDebugMode()
{
return debugMode;
}
} }
...@@ -38,6 +38,7 @@ void log(const int, const char*, ...); ...@@ -38,6 +38,7 @@ void log(const int, const char*, ...);
void setConsoleLog(bool); void setConsoleLog(bool);
void setDebugMode(bool); void setDebugMode(bool);
bool getDebugMode();
}; };
#define ERROR(...) Logger::log(LOG_ERR, __VA_ARGS__) #define ERROR(...) Logger::log(LOG_ERR, __VA_ARGS__)
......
...@@ -178,7 +178,8 @@ SIPVoIPLink::SIPVoIPLink() : transportMap_(), evThread_(new EventThread(this)) ...@@ -178,7 +178,8 @@ SIPVoIPLink::SIPVoIPLink() : transportMap_(), evThread_(new EventThread(this))
TRY(pj_init()); TRY(pj_init());
TRY(pjlib_util_init()); TRY(pjlib_util_init());
pj_log_set_level(6); // From 0 (min) to 6 (max) // From 0 (min) to 6 (max)
pj_log_set_level(Logger::getDebugMode() ? 6 : 0);
TRY(pjnath_init()); TRY(pjnath_init());
pj_caching_pool_init(cp_, &pj_pool_factory_default_policy, 0); pj_caching_pool_init(cp_, &pj_pool_factory_default_policy, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment