Hi, I use colors for the XLOGs with log_stderror=yes, this is nice when I'm learning and debuggoing all the time.
But for a production system I know I need to disable log_stderror and log into Syslog (for example using a specific local facility for logging in an independent file /var/log/openser.log).
But in that way I loose my cool colors that help me a lot debugging.
A solution I'm thinking about is to use "log_stderror=yes" and start OpenSer redirecting the output to a file, but sincerely I don't think this is very effective and serious.
Any suggestion? maybe I should forget my funny colors?
Thanks.
I guess this is the answer you are looking for: http://www.openser.org/docs/modules/1.2.x/xlog.html#AEN86
Daniel
On 07/31/07 17:26, Iñaki Baz Castillo wrote:
Hi, I use colors for the XLOGs with log_stderror=yes, this is nice when I'm learning and debuggoing all the time.
But for a production system I know I need to disable log_stderror and log into Syslog (for example using a specific local facility for logging in an independent file /var/log/openser.log).
But in that way I loose my cool colors that help me a lot debugging.
A solution I'm thinking about is to use "log_stderror=yes" and start OpenSer redirecting the output to a file, but sincerely I don't think this is very effective and serious.
Any suggestion? maybe I should forget my funny colors?
Thanks.
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@openser.domain.org^[[0;39;49m -- FROM: ^[[0;36;40msip:800@openser.domain.org^[[0;39;49m -- TO: ^[[0;36;40msip:105@openser.domain.org^[[0;39;49m -- Twinkle/1.1alpha2 (212.121.235.18:6800) --^M ^[[0m
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@openser.domain.org^[[0;39;49m -- FROM: ^[[0;36;40msip:800@openser.domain.org^[[0;39;49m -- TO: ^[[0;36;40msip:105@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
El Tuesday 31 July 2007 16:42:19 Daniel-Constantin Mierla escribió:
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
Yes, I know, I was thinking about use "lwatch" or other commands that colorize text and so.
Thanks.
A solution I'm thinking about is to use "log_stderror=yes" and start OpenSer redirecting the output to a file, but sincerely I don't think this is very effective and serious.
It is a slightly different way of looking at things, but maybe Multitail could help you out.
"It can also use colors while displaying the logfiles (through regular expressions), for faster recognition of what is important and what not."
El Tuesday 31 July 2007 16:32:42 Andreas Sikkema escribió:
A solution I'm thinking about is to use "log_stderror=yes" and start OpenSer redirecting the output to a file, but sincerely I don't think this is very effective and serious.
It is a slightly different way of looking at things, but maybe Multitail could help you out.
"It can also use colors while displaying the logfiles (through regular expressions), for faster recognition of what is important and what not."
This is very interesting and I knew nothing about it. Thanks, I'll try it :)