Pekka Pessi wrote: > On 12/8/06, Roman Filonenko wrote: >> For now, tport uses TPORT_LOG and TPORT_DUMP environment variables to >> configure the log flags and we found that more dynamic configuration of >> the above flags (e.g. on nua_create()) is much more comfortable. > > Thanks. I think that having environment variables to override the > application configuration behavious is more flexible (so TPORT_LOG > environment variable would override TPTAG_LOG() - you could debug a > process simply by setting the environment variable). That is the way > TPORT_DEBUG and su_log_soft_set_level() works. Perhaps a second tag, > TPORT_LOG_OVERRIDE()? > > Any opinions? Application settings override environment, or vice versa? The primary reason I had for application settings to override environment was simple - to control the log settings on per nua_t basis.
With TPORT_LOG_OVERRIDE() tag one won't be able to quickly get all the logs just setting the env. variable. Maybe adding TPORT_LOG_OVERRIDE environment variable (but not tag) will help - defaults may be provided with TPORT_LOG environment variable, application may override it on a per nua_t basis with TPORT_LOG() tag and, if needed for debugging, TPORT_LOG_OVERRIDE environment variable will override all the previous settings. > > Another thing: an nta application could use several primary transports > with different settings, stored in tport_params_t. Now if we set the > logging with tags, it would probably be much nicer to store the log > bit in in tport_params_t instead of mr_log. The mr_dump_file is a bit > trickier. > Agree. Best regards, Roman ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sofia-sip-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
