Does anybody else have the feeling that custom messages (Verbose(1,...)) do not stand out enough on the CLI? We're sending messages like "Extension 123 is unknown" to the output and that should tell the user why a call to 123 fails but users fre- quently crank up the verbosity to 3 or 10 so our messages go unnoticed in many cases. My idea was to use terminal escape sequences to make my messages bold and black on yellow background. apps/app_verbose.c: static int verbose_exec(struct ast_channel *chan, void *data) { ... switch (vsize) { case 0: - ast_verbose("%s\n", vtext); + ast_verbose("\x1B[103;30;1m %s \x1B[0m\n", vtext); break; case 1: - ast_verbose(VERBOSE_PREFIX_1 "%s\n", vtext); + ast_verbose(VERBOSE_PREFIX_1 "\x1B[103;30;1m %s \x1B[0m\n", vtext); break; That's just an ugly hack of course but you get the idea. I have the feeling that whenever somebody uses Verbose() there is a reason for doing so and thus the messages should be a lot more eye- catching. Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de --
On Sun, 26 Jul 2009, Philipp Kempgen wrote:> Does anybody else have the feeling that custom messages (Verbose(1,...)) > do not stand out enough on the CLI?Yes.> We're sending messages like "Extension 123 is unknown" to the output and > that should tell the user why a call to 123 fails but users frequently > crank up the verbosity to 3 or 10 so our messages go unnoticed in many > cases.Your users can change the verbosity?> My idea was to use terminal escape sequences to make my messages bold > and black on yellow background. apps/app_verbose.c:I'm not a big fan of escape sequences and colors because they mung up console log files, greps, text based emails, and not all terminal emulators interpret them correctly even if the TERM environment variable is set correctly. I think "indentation" to indicate significance may be better. Currently (1.2), verbose() indents based on an optional "level" from 0 to 4 as follows: verbose level 0 verbose level 1 == verbose level 2 -- verbose level 3 > verbose level 4 > verbose level 5 with "unspecified" messages displayed as level 0 If "level 0" was indented one more level than 4, your "level 1" messages would stick out like the proverbial sore thumb from the fire hydrant of a busy console. Of course, training admins to stop [ab]using "noop()" would be a great first step :) -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Hi, I fully back the idea something has to be done to improve the way you can tune CLI output to fit specific needs : 1. Ourselves, we are using AEL and output is bloated with lines of little value. 2. Being able to control Verbose way of printing would be very useful too. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090727/b726e093/attachment.htm