mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its own concept of what the verbosity level is. The big feature here is that the logger will now be able to capture a particular verbosity level without condemning each console to need to suffer that level of verbosity. Additionally, a stray 'core set verbose' will no longer change what will go to the log. Review: https://reviewboard.asterisk.org/r/1599/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -156,15 +156,13 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data,
|
||||
case 'a':
|
||||
case 'A':
|
||||
ast_channel_setwhentohangup_tv(chan, when);
|
||||
if (VERBOSITY_ATLEAST(3)) {
|
||||
if (!ast_tvzero(chan->whentohangup)) {
|
||||
when = ast_tvadd(when, ast_tvnow());
|
||||
ast_strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S.%3q %Z",
|
||||
ast_localtime(&when, &myt, NULL));
|
||||
ast_verbose("Channel will hangup at %s.\n", timestr);
|
||||
} else {
|
||||
ast_verbose("Channel hangup cancelled.\n");
|
||||
}
|
||||
if (!ast_tvzero(chan->whentohangup)) {
|
||||
when = ast_tvadd(when, ast_tvnow());
|
||||
ast_strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S.%3q %Z",
|
||||
ast_localtime(&when, &myt, NULL));
|
||||
ast_verb(3, "Channel will hangup at %s.\n", timestr);
|
||||
} else {
|
||||
ast_verb(3, "Channel hangup cancelled.\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user