[OpenSER-Devel] [ openser-Bugs-1765517 ] XLOG: force_color=0, but code appears it was in a variable

SourceForge.net noreply at sourceforge.net
Wed Oct 3 12:58:41 CEST 2007


Bugs item #1765517, was opened at 2007-08-01 17:39
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1765517&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: modules
>Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Iñaki Baz (ibc_sf)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: XLOG:  force_color=0, but code appears it was in a variable

Initial Comment:
Using modparam("xlog", "force_color", 0) the color code $(Cxx) shouldn't appear in log (syslog), but if that color code was stored in a variable then it is printed anyway.

I mean, for using different colors for each message I do:

    switch($rm)
	   {
		case "INVITE":
			$var(color) = $(Csc);
			break;
		case "BYE":
			$var(color) = $(Csc);
			break;
		case "REGISTER":
			$var(color) = $(Csy);
			break;
                      ....
        ....
    xlog("L_INFO", "$var(color)$rm $ru$(Cxx)\n");
     

But it that way I get in the logfile ^[[0;30;43m and so for these colors. IMHO those codes shouldn't appear evei if are stored in variables.


----------------------------------------------------------------------

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-10-03 13:58

Message:
Logged In: YES 
user_id=1246013
Originator: NO

I just tested and seems to work ok. The next lines print same output:

	$var(c) = $C(br);
	xlog("L_INFO", "$var(c)$fu$C(xx)\n");
	xlog("L_INFO", "$C(br)$fu$C(xx)\n");

Do you have a escape-capable term? Do you redirect to some file?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1765517&group_id=139143



More information about the Devel mailing list