[asterisk-dev] Asterisk 1.8.1 seems not logging any queue activity until a reload is triggered
Marco Signorini
marcotasto at libero.it
Mon Dec 13 08:03:07 UTC 2010
Hi,
I'm testing the new Asterisk 1.8.1 release and I'm finding a strange
problem I would like to share with the dev-list members.
If I start an asterisk 1.8.1, and I generate some queues activity, this
seems not reported on the queue_log until I issue a "core reload"
command from the CLI.
Looking at the code I've found something that I can't understand: in the
init_logger function present in the logger.c file I can see that the
qlog file hander is assigned to a new file only if qlog itself is
different from NULL.
That sounds strange to me because I suspect that the log file should
always be open.
I've changed the init_logger code to have something similar to:
...
if (qlog)
fclose(qlog);
{
char tmp[4096];
snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_LOG_DIR,
queue_log_name);
qlog = fopen(tmp, "a");
}
...
and this seems to solve the issue... but I would like to have a feedback
to understand if it's the right way.
The problem is not present when issuing a reload because, in this case,
the function reload_logger is called instead.
The same behavior seems present in the 1.8.0 revision.
Thank you and regards,
Marco Signorini.
--
=============================
EtherMania di Signorini Marco
For network enthusiast people
- http://www.ethermania.com -
More information about the asterisk-dev
mailing list