[asterisk-users] Verbose() messages go unnoticed
Philipp Kempgen
philipp.kempgen at amooma.de
Sun Jul 26 10:13:26 CDT 2009
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
--
More information about the asterisk-users
mailing list