0000-set_apps_initial_log_level.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From c40ad6ba454fdf6456d8ffa92faa4cd49f2c807d Mon Sep 17 00:00:00 2001
  2. From: Richard Mudgett <rmudgett@digium.com>
  3. Date: Thu, 23 Feb 2017 17:11:00 -0600
  4. Subject: [PATCH 3/5] 0000-set_apps_initial_log_level.patch
  5. ---
  6. pjsip-apps/src/pjsua/main.c | 2 ++
  7. pjsip-apps/src/pjsystest/main_console.c | 2 ++
  8. pjsip-apps/src/python/_pjsua.c | 3 ++-
  9. 3 files changed, 6 insertions(+), 1 deletion(-)
  10. diff --git a/pjsip-apps/src/pjsua/main.c b/pjsip-apps/src/pjsua/main.c
  11. index 2baaf82..11831f2 100644
  12. --- a/pjsip-apps/src/pjsua/main.c
  13. +++ b/pjsip-apps/src/pjsua/main.c
  14. @@ -126,5 +126,7 @@ int main_func(int argc, char *argv[])
  15. int main(int argc, char *argv[])
  16. {
  17. + pj_log_set_level(1);
  18. +
  19. return pj_run_app(&main_func, argc, argv, 0);
  20. }
  21. diff --git a/pjsip-apps/src/pjsystest/main_console.c b/pjsip-apps/src/pjsystest/main_console.c
  22. index 122cdc7..dc79eab 100644
  23. --- a/pjsip-apps/src/pjsystest/main_console.c
  24. +++ b/pjsip-apps/src/pjsystest/main_console.c
  25. @@ -133,6 +133,8 @@ void gui_sleep(unsigned sec)
  26. int main()
  27. {
  28. + pj_log_set_level(1);
  29. +
  30. if (systest_init() != PJ_SUCCESS)
  31. return 1;
  32. diff --git a/pjsip-apps/src/python/_pjsua.c b/pjsip-apps/src/python/_pjsua.c
  33. index 31b835e..3e15030 100644
  34. --- a/pjsip-apps/src/python/_pjsua.c
  35. +++ b/pjsip-apps/src/python/_pjsua.c
  36. @@ -4434,7 +4434,8 @@ init_pjsua(void)
  37. PyObject* m = NULL;
  38. #define ADD_CONSTANT(mod,name) PyModule_AddIntConstant(mod,#name,name)
  39. -
  40. + pj_log_set_level(1);
  41. +
  42. PyEval_InitThreads();
  43. if (PyType_Ready(&PyTyp_pjsua_callback) < 0)
  44. --
  45. 2.7.4