Hi,
as in subject.

This should make debugging easier, I'm not sure this is the better way
to define the logging level, please provide some feedback if you think
something could be done better.

Best regards.
--- old-sofsip-cli/src/ssc_sip.h	2008-07-02 14:45:49.000000000 +0200
+++ new-sofsip-cli/src/ssc_sip.h	2008-07-02 14:45:49.000000000 +0200
@@ -108,6 +108,7 @@
   const char   *ssc_aor;        /**< Public SIP address aka AOR (SIP URI) */
   const char   *ssc_certdir;	/**< Directory for TLS certs (directory path) */
   const char   *ssc_contact;	/**< SIP contact URI (local address to use) */
+  const char   *ssc_su_log_level;	/**< sofia-sip SU logging verboseness level */
   const char   *ssc_media_addr;	/**< Media address (hostname, IP address) */
   const char   *ssc_media_impl;	/**< Media address (hostname, IP address) */
   const char   *ssc_proxy;	/**< SIP outbound proxy (SIP URI) */

--- old-sofsip-cli/src/sofsip_cli.c	2008-07-02 14:45:49.000000000 +0200
+++ new-sofsip-cli/src/sofsip_cli.c	2008-07-02 14:45:49.000000000 +0200
@@ -285,6 +285,7 @@
   /* long, short, flags, arg, arg_data, desc, arg_desc */
   GOptionEntry options[] = {
     { "autoanswer", 'a', 0, G_OPTION_ARG_NONE, &conf->ssc_autoanswer, "Auto-answer to calls", NULL },
+    { "verbose", 'v', 0, G_OPTION_ARG_INT, &conf->ssc_su_log_level, "Set the sofia-sip logging verboseness level (0 to 9)", "integer"},
     { "register", 'R', 0, G_OPTION_ARG_NONE, &conf->ssc_register, "Register at startup", NULL },
     { "contact", 'c', 0, G_OPTION_ARG_STRING, &conf->ssc_contact, "SIP contact, local address to bind to (optional)", "SIP-URI" },
     { "media-addr", 'm', 0, G_OPTION_ARG_STRING, &conf->ssc_media_addr, "media address (optional)", "address"  },
@@ -323,6 +324,8 @@
     }
   }
 
+  su_log_set_level(NULL, (unsigned int)conf->ssc_su_log_level);
+
   su_wait_create(&cli->cli_input, 0, SU_WAIT_IN); 
   if (su_root_register(cli->cli_root, 
 		       &cli->cli_input, 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to