logger: Console sessions will now respect logger.conf dateformat= option

The 'core' console (ie: asterisk -c) does read logger.conf and does
use the dateformat= option.

Whereas 'remote' consoles (ie: asterisk -r -T) does not read logger.conf
and uses a hard coded dateformat option for printing received verbose messages:
  main/logger.c: static char dateformat[256] = "%b %e %T"

This change will load logger.conf for each remote console session and
use the dateformat= option to set the per-line timestamp for verbose messages

Change-Id: I3ea10990dbd920e9f7ce8ff771bc65aa7f4ea8c1
ASTERISK-25358: #close
Reported-by: Igor Liferenko
This commit is contained in:
Mark Murawski
2021-03-19 10:11:26 -04:00
committed by George Joseph
parent 4393207751
commit a0009c807e
4 changed files with 71 additions and 0 deletions

View File

@@ -621,6 +621,11 @@ an entry/exit message. To do so, you can use the ast_trace macros...
*/
unsigned int ast_trace_get_by_module(const char *module);
/*!
* \brief load logger.conf configuration for console socket connections
*/
void ast_init_logger_for_socket_console(void);
#define TRACE_ATLEAST(level) \
(option_trace >= (level) \
|| (ast_opt_trace_module \