Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
On Fri, Mar 6, 2009 at 11:59 PM, Tiago Durante tiagodura...@gmail.com wrote: On Fri, Mar 6, 2009 at 10:39 AM, Johann Steinwendtner steinwendt...@gmx.net wrote: Danny Nicholas wrote: The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans Sorry, that I wasn't clear enough. The logfiles contains escape codes + the colour codes. e.g.: [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered custom function 'ESC[1;36;40mSQL_ESCESC[0;37;40m' [Feb 12 13:38:30] VERBOSE[19816] logger.c: func_odbc.so = (ESC[33;40mODBC lookupsESC[0;37;40m) [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered application 'ESC[1;36;40mReadFileESC[0;37;40m' I do not use a GUI. same thing happens to me, as far as I noticed only in one server... asterisk 1.6.0.5... when you do a, lets say, tail -f /var/log/asterisk/full its kinda of cool, because you can check the log with colors... but the log itself become a mess... regards, Well, it's nice in console, but not that for analyzing. I would prefer disable option for that. Also i wrote simple wrapper, to allow browsing logs from web. It might need some tuning (see if ANSI: string comes out and add some colors - only 2 colors are converted for now), but it works nice for my asterisk logs :) Regards, Atis function logfile_ansi_to_html($str) { $tokens = explode(chr(27).'[',$str); $result = array_shift($tokens); foreach ($tokens as $k=$v) { $end = 8; $code = substr($v,0,$end); if ($code=='0;37;40m') $result .= '/b'; else if ($code=='1;36;40m') $result .= 'b style=color: navy'; else if ($code=='1;35;40m') $result .= 'b style=color: #cc3366'; else $result .= 'ANSI:'.$code; $result .= substr($v,$end); } return $result; } -- Atis Lezdins, VoIP Project Manager / Developer, IQ Labs Inc, a...@iq-labs.net Skype: atis.lezdins Cell Phone: +371 28806004 Cell Phone: +1 800 7300689 Work phone: +1 800 7502835 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
On Friday 06 March 2009 09:39:30 am Johann Steinwendtner wrote: Sorry, that I wasn't clear enough. The logfiles contains escape codes + the colour codes. e.g.: [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered custom function 'ESC[1;36;40mSQL_ESCESC[0;37;40m' [Feb 12 13:38:30] VERBOSE[19816] logger.c: func_odbc.so = (ESC[33;40mODBC lookupsESC[0;37;40m) [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered application 'ESC[1;36;40mReadFileESC[0;37;40m' You're correct, but only for VERBOSE lines. The other log levels do not contain color codes. This is more of a consequence of verbose messages getting colorized prior to output than anything else, and as pointed out before, this is not unique to 1.6.0. Given that the VERBOSE level is so, well, verbose, most people do not enable that log level in production, but turn it on only for debugging purposes. -- Tilghman ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] colorized logfiles in asterisk 1.6.0.6
Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
Danny Nicholas wrote: The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans Sorry, that I wasn't clear enough. The logfiles contains escape codes + the colour codes. e.g.: [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered custom function 'ESC[1;36;40mSQL_ESCESC[0;37;40m' [Feb 12 13:38:30] VERBOSE[19816] logger.c: func_odbc.so = (ESC[33;40mODBC lookupsESC[0;37;40m) [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered application 'ESC[1;36;40mReadFileESC[0;37;40m' I do not use a GUI. Thanks. Hans ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
This is a feature. It seems to be the same in 1.4.21, 1.4.22 and 1.6, but you could just change lines 150-155 in logger.c and recompile. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 9:40 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Danny Nicholas wrote: The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans Sorry, that I wasn't clear enough. The logfiles contains escape codes + the colour codes. e.g.: [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered custom function 'ESC[1;36;40mSQL_ESCESC[0;37;40m' [Feb 12 13:38:30] VERBOSE[19816] logger.c: func_odbc.so = (ESC[33;40mODBC lookupsESC[0;37;40m) [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered application 'ESC[1;36;40mReadFileESC[0;37;40m' I do not use a GUI. Thanks. Hans ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
Ugh! That's a terrible feature, if that's unselectable. However, I don't see that being the case in SVN-TRUNK as of a few days ago (well, Feb 17th.) My logfiles don't have any escape codes/color codes in them. What version, exactly, are you using? JT On Mar 6, 2009, at 7:54 AM, Danny Nicholas wrote: This is a feature. It seems to be the same in 1.4.21, 1.4.22 and 1.6, but you could just change lines 150-155 in logger.c and recompile. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 9:40 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Danny Nicholas wrote: The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans Sorry, that I wasn't clear enough. The logfiles contains escape codes + the colour codes. e.g.: [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered custom function 'ESC[1;36;40mSQL_ESCESC[0;37;40m' [Feb 12 13:38:30] VERBOSE[19816] logger.c: func_odbc.so = (ESC[33;40mODBC lookupsESC[0;37;40m) [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered application 'ESC[1;36;40mReadFileESC[0;37;40m' I do not use a GUI. Thanks. Hans --- John Todd email:jt...@digium.com Digium, Inc. | Asterisk Open Source Community Director 445 Jan Davis Drive NW - Huntsville AL 35806 - USA direct: +1-256-428-6083 http://www.digium.com/ ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
One opcion..!! cat /var/log/asterisk/messages |grep '#callerid=Helius' --color=auto On Fri 06 Mar 2009 12:10:32 Danny Nicholas wrote: The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
On Fri, Mar 06, 2009 at 09:59:18AM +0100, Johann Steinwendtner wrote: Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. There are quite a few programs to color your logs: $ apt-cache search log | grep -i color ccze - A robust, modular log coloriser linuxlogo - Color ANSI System Logo loco - Perl script to add nice colors to your /var/log/messages file lwatch - A simple log colorizer Just 3 hits with a simple search. Generally such a program is trivial to write in sed, perl or whatever. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] colorized logfiles in asterisk 1.6.0.6
On Fri, Mar 6, 2009 at 10:39 AM, Johann Steinwendtner steinwendt...@gmx.net wrote: Danny Nicholas wrote: The log files themselves are not in color. It would be a style sheet change on the GUI. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johann Steinwendtner Sent: Friday, March 06, 2009 2:59 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] colorized logfiles in asterisk 1.6.0.6 Hello ! I've upgraded our testsystem from asterisk 1.4.21 to asterisk 1.6.0.6. We 've noticed that the log files are now in colour. I could not find a note in the upgrade section about this. Is this a feature or a bug ? It might be usefull to have them not in colour. best regards Hans Sorry, that I wasn't clear enough. The logfiles contains escape codes + the colour codes. e.g.: [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered custom function 'ESC[1;36;40mSQL_ESCESC[0;37;40m' [Feb 12 13:38:30] VERBOSE[19816] logger.c: func_odbc.so = (ESC[33;40mODBC lookupsESC[0;37;40m) [Feb 12 13:38:30] VERBOSE[19816] logger.c: == Registered application 'ESC[1;36;40mReadFileESC[0;37;40m' I do not use a GUI. same thing happens to me, as far as I noticed only in one server... asterisk 1.6.0.5... when you do a, lets say, tail -f /var/log/asterisk/full its kinda of cool, because you can check the log with colors... but the log itself become a mess... regards, -- Tiago Durante ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., Perseverance is the hard work you do after you get tired of doing the hard work you already did. -- Newt Gingrich ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users