Hi all,

This is a heads up regarding some latest changes over OpenSIPS 2.2 / devel branch, changes that do impact your scripts :

1) *"fork" option replaced wit**h "debug_mode"*
The fork/don't fork option made no sense anymore in the new OpenSIPS architecture (with async reactor). Even more, the so called "fork" was related only to SIP workers (even with fork=no, opensips was forking timer process, per-module processes); not to mention the fork=no limitation to only one UDP interface. Shortly, the "fork" option became outdated, causing more problem (coding and experience), rather than something useful. "debug_mode" option was introduce as better way to switch on and off a fast way to debug your opensips. Upon enabling the "debug_mode", opensips will automatically force:
     - staying in foreground (do not detach from console)
     - set logging level to 4 (debug)
     - set logging to standard error
     - enable core dumping
     - set UDP worker processes to 2
     - set TCP worker processes to 2

2) *"debug" option replaced with "log_level"*
The global parameter "debug" was renamed "log_level" for a more accurate description of the setting. The values and the behavior were kept exactly as before. Of course the MI function "debug" was renamed to "log_level".

3) *"set_debug()" function replaced with "$log_level" variable*
Th3e $log_level with behave upon writing exactly as old set_debug() - a new logging level will be set (as number) or the log level will be reset (for a NULL input). Even more, the variable will accept to be populated from other variables/transformations. Upon reading, the current per process logging level will be returned.
    Ex :
        $avp(custom_log_level) = 4;
        xlog("Current logging level is $log_level\n");
        $log_level = $avp(custom_log_level); /* switch to debug level */
        xlog("Running in debug level ($log_level) now\n");
$log_level = NULL;
   xlog("Resetting back to logging level $log_level\n");


Any feedback or reports are welcome !

--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to