asterisk/utils
Matt Jordan 3522376512 logger: Support JSON logging with Verbose messages
When 2d7a4a3357 was merged, it missed the fact that Verbose log messages
are formatted and handled by 'verbosers'. Verbosers are registered
functions that handle verbose messages only; they exist as a separate
class of callbacks. This was done to handle the 'magic' that must be
inserted into Verbose messages sent to remote consoles, so that the
consoles can format the messages correctly, i.e., the leading
tabs/characters.

In reality, verbosers are a weird appendage: they're a separate class of
formatters/message handlers outside of what handles all other log
messages in Asterisk. After some code inspection, it became clear that
simply passing a Verbose message along with its 'sublevel' importance
through the normal logging mechanisms removes the need for verbosers
altogether.

This patch removes the verbosers, and makes the default log formatter
aware that, if the log channel is a console log, it should simply insert
the 'verbose magic' into the log messages itself. This allows the
console handlers to interpret and format the verbose message
themselves.

This simplifies the code quite a lot, and should improve the performance
of printing verbose messages by a reasonable factor:
(1) It removes a number of memory allocations that were done on each
    verobse message
(2) It removes the need to strip the verbose magic out of the verbose
    log messages before passing them to non-console log channels
(3) It now performs fewer iterations over lists when handling verbose
    messages

Since verbose messages are now handled like other log messages (for the
most part), the JSON formatting of the messages works as well.

ASTERISK-25425

Change-Id: I21bf23f0a1e489b5102f8a035fe8871552ce4f96
2016-05-14 22:44:16 -05:00
..
db1-ast Replace Berkeley DB with SQLite 3 2011-07-06 20:58:12 +00:00
.gitignore Fixes for OS X 2015-06-05 11:23:16 -05:00
Makefile Modules: Make ast_module_info->self available to auxiliary sources. 2015-05-04 20:47:01 -04:00
ael_main.c CLI: Enable automatic references to modules. 2015-05-04 20:47:18 -04:00
astcanary.c Merged revisions 328247 via svnmerge from 2011-07-14 20:28:54 +00:00
astdb2bdb.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
astdb2sqlite3.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
astman.1 remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
astman.c utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
check_expr.c utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
clicompat.c CLI: Enable automatic references to modules. 2015-05-04 20:47:18 -04:00
conf2ael.c CLI: Enable automatic references to modules. 2015-05-04 20:47:18 -04:00
expr2.testinput Merged revisions 179807 via svnmerge from 2009-03-03 22:12:02 +00:00
extconf.c logger: Support JSON logging with Verbose messages 2016-05-14 22:44:16 -05:00
frame.c utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
frame.h utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
muted.c utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
smsq.c utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
stereorize.c Merged revisions 328247 via svnmerge from 2011-07-14 20:28:54 +00:00
streamplayer.c utils: Remove trailing whitespace 2015-05-03 05:28:07 -04:00
utils.xml main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output 2014-04-11 02:59:19 +00:00