[OpenSER-Users] Colored logs in a file

Daniel-Constantin Mierla daniel at voice-system.ro
Tue Jul 31 16:42:19 CEST 2007



On 07/31/07 17:38, Iñaki Baz Castillo wrote:
> El Tuesday 31 July 2007 16:28:40 Daniel-Constantin Mierla escribió:
>   
>> I guess this is the answer you are looking for:
>> http://www.openser.org/docs/modules/1.2.x/xlog.html#AEN86
>>     
>
> Thanks, but I've already tryed that with no success.
>
>
> I log into /var/log/openser and lines that in the main router appear as:
>   xlog("L_INFO", "-- $var(color)$rm $ru$(Cxx) -- FROM: $(Ccs)$fu$(Cxx) -- TO: $(Ccs)$tu$(Cxx) -- $ua ($si:$sp) --\r\n");
>
>
> I get the following in /var/log/openser with no color at all:   :(
>   Jul 31 16:34:11 openser /usr/sbin/openser[31278]: -- ^[[0;30;46mINVITE sip:105 at openser.domain.org^[[0;39;49m -- FROM: ^[[0;36;40msip:800 at openser.domain.org^[[0;39;49m -- TO: ^[[0;36;40msip:105 at openser.domain.org^[[0;39;49m -- Twinkle/1.1alpha2 (212.121.235.18:6800) --^M ^[[0m
>   
you need to use a escape-sequence-capable tool (tail, less) when reading 
the file. If you redirect to a file, you won't get colored text, you 
will get the same as with force color.

Daniel



>
>
>
>   




More information about the Users mailing list