Module: sip-router
Branch: master
Commit: 2ae18b74b76627d5bad05dcce4bc7a9e6f628863
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2ae18b7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 9 09:10:49 2014 +0200
presence: new parameter local_log_level
- control verbosity of some log messages
- default value: L_INFO
---
modules/presence/notify.c | 5 ++++-
modules/presence/presence.c | 2 ++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules/presence/notify.c b/modules/presence/notify.c
index a5184cd..24c0a9d 100644
--- a/modules/presence/notify.c
+++ b/modules/presence/notify.c
@@ -55,6 +55,8 @@
#define ALLOC_SIZE 3000
#define MAX_FORWARD 70
+extern int pres_local_log_level;
+
c_back_param* shm_dup_cbparam(subs_t*);
void free_cbparam(c_back_param* cb_param);
@@ -1594,7 +1596,8 @@ jump_over_body:
goto error;
}
- LM_DBG("NOTIFY %.*s via %.*s on behalf of %.*s for event %.*s\n",
+ LM_GEN1(pres_local_log_level,
+ "NOTIFY %.*s via %.*s on behalf of %.*s for event %.*s\n",
td->rem_uri.len, td->rem_uri.s, td->hooks.next_hop->len,
td->hooks.next_hop->s,
td->loc_uri.len, td->loc_uri.s, subs->event->name.len,
diff --git a/modules/presence/presence.c b/modules/presence/presence.c
index 3cdfd0b..03eeb56 100644
--- a/modules/presence/presence.c
+++ b/modules/presence/presence.c
@@ -85,6 +85,7 @@ MODULE_VERSION
char *log_buf = NULL;
static int clean_period=100;
static int db_update_period=100;
+int pres_local_log_level = L_INFO;
/* database connection */
db1_con_t *pa_db = NULL;
@@ -203,6 +204,7 @@ static param_export_t params[]={
{ "send_fast_notify", INT_PARAM, &send_fast_notify},
{ "fetch_rows", INT_PARAM, &pres_fetch_rows},
{ "db_table_lock_type", INT_PARAM, &db_table_lock_type},
+ { "local_log_level", PARAM_INT, &pres_local_log_level},
{0,0,0}
};