Repository navigation
[bug]: Strange warning - 'T' option is not compatible with remote console mode and has no effect. #102
Description
Activity
@InterLinked1 This warning came from you. Can you clarify why you thought T didn't work on remote console, and if you were incorrect?
Hmm. I don't recall that was something I came up with...
Related to logging... the thing I definitely do remember was adding support for respecting logger.conf whether or not you're in the console or not for things like timestamp format.commit a0009c807eb6ad01ea0827b2b14ea3bd433ddc69 Author: Mark Murawski <markm@intellasoft.net> Date: Fri Mar 19 10:11:26 2021 -0400 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 LiferenkoThis change is a fix, so that logger.conf gets used with the -T option... It definitely does have a behavior effect when used.
But.. I did find:
commit 09e989f972e2583df4e9bf585c246c37322d8d2f Author: Naveen Albert <asterisk@phreaknet.org> Date: Sat Mar 5 11:43:13 2022 +0000 asterisk.c: Warn of incompatibilities with remote console. Some command line options to Asterisk only apply when Asterisk is started and cannot be used with remote console mode. If a user tries to use any of these, they are currently simply silently ignored. This prints out a warning if incompatible options are used, informing users that an option used cannot be used with remote console mode. Additionally, some clarifications are added to the help text and man page. ASTERISK-22246 ASTERISK-26582 Change-Id: I980a5380ef2c19e8ea348596396d5382893c433709e989f972e main/asterisk.c (Naveen Albert 2022-03-05 11:43:13 +0000 3775) case 'T': /* timestamp */ 09e989f972e main/asterisk.c (Naveen Albert 2022-03-05 11:43:13 +0000 3776) case 't': /* cache record files */ 09e989f972e main/asterisk.c (Naveen Albert 2022-03-05 11:43:13 +0000 3777) case 'U': /* run user */ 09e989f972e main/asterisk.c (Naveen Albert 2022-03-05 11:43:13 +0000 3778) fprintf(stderr, "'%c' option is not compatible with remote console mode and has no effect.\n", c); 09e989f972e main/asterisk.c (Naveen Albert 2022-03-05 11:43:13 +0000 3779) didwarn = 1; 09e989f972e main/asterisk.c (Naveen Albert 2022-03-05 11:43:13 +0000 3780) }I'm not sure what you' referring to. I didn't tag you or anything. Naveen Albert is InterLinked.
@InterLinked1 This warning came from you. Can you clarify why you thought T didn't work on remote console, and if you were incorrect?
Probably just an oversight. I just tested this and the 'T' option does seem to have some special handling at least for verbose messages. I can fix the warning if you assign this to me.
@jcolp Whoops sorry. I didn't process the tag aspect. Still getting familiar with github.
I can't change assignments I don't believe.
- addedsupport-level-coreFunctionality with core support levelFunctionality with core support leveland removed
on May 18, 2023 You can't, but I did.
@InterLinked1 Here's something to check out.
If you run asterisk out of the box without any special options or logging setup.. timestamps only print to the log file, and then when you connect via asterisk -r, there's no timestamps on verbose messages, you only get timestamps on errors,warnings,notices
If you do asterisk -rT, then you do get timestampes on all verbose messages
- added 2 commits that reference this issue
on May 18, 2023 - added a commit that references this issue
on May 22, 2023 - added 2 commits that reference this issue
on May 22, 2023 - added 6 commits that reference this issue
on Jun 30, 2023 - added 2 commits that reference this issue
on Jul 10, 2023
Severity
Trivial
Versions
18, 19, 20, 21
Components/Modules
cli
Operating Environment
Any
Frequency of Occurrence
Constant
Issue Description
But.. the -T option does have an effect. It turns on timestamps for all console messages, even if asterisk is not configured to do so by default.
@InterLinked1
Relevant log output
No response
Asterisk Issue Guidelines