Setting in logger.conf "console => verbose(5)" do not affect root console asterisk

Hello team!

Trying get root console of Asterisk with initial verbosity level of 5 by setting logger.conf to:
console => notice,warning,error,verbose(5)

But when I am logged in to asterisk, core show settings tell me that:

Root console verbosity:      0
Current console verbosity:   0

What affects setting verbose(<level>) in logger.conf then?

You still need to enable verbose logging. There are multiple ways to do this. Either from the Asterisk CLI, at startup, or from within asterisk.conf.

Also see the following wiki pages for more general logging information:

Asterisk Main Configuration File
Logging Configuration
Verbosity in Core and Remote Consoles

Got it, so I should enable verbose additional by one of 3 ways you provided because line
“console => verbose(5)” in logger.conf
actually do not affect on anything and can be considered as obsoleted?

It is not obsoleted. From the Logging Configuration page

; The "verbose" value can take an optional integer argument that indicates the maximum level
; of verbosity to log at.  Verbose messages with higher levels than the indicated level will
; not be logged to the file.  If a verbose level is not given, verbose messages are logged
; based upon the current level set for the root console.

Basically, the configuration in logger.conf states what you want to log and where. However, some of those items like debug and verbose are not output until you enable them. Which is done via one of the three ways mentioned.

Got it, so despite of what I put in logger.conf, additionally verbose or/and debug messages should be enabled in console.
However little bit confusing from my point of view, because if you want verbose messages in console you need specify it directly in console or other ways, and logger.conf is not considered.

Thank you for explanation.

Here’s one way to think of it:

Asterisk generates various information based notifications based on the pre-determined importance of that information. Some notifications are deemed important enough to always be generated. For example, notices, warnings, and errors. Other notifications types, like debug and verbose are not as important, and can increase system load (they can output a lot of notifications), so these have to be manually enabled. This way the system is not under an increase load except when needed.

Now Asterisk is generating those notifications, but where do they go? To a particular file? Console? That’s where logger.conf comes in. There you can define where a notification goes when it’s generated. You want errors, warnings, and notices to go to the Asterisk full log file? Then specify them in its list:

full => notice,warning,error

You only want warnings and errors in that file?

full => warning,error

How about verbose messages?

full => warning,error,verbose

In this last case remember Asterisk is always generating certain notifications so you’ll see warning and errors in the “full” log file. However, since Asterisk does not generate verbose notifications until you enable it then you will not see those in the log file until you enable verbosity.

If you enable a verbose level in Asterisk but don’t have it set to go anywhere. For instance:

full => warning,error

Then Asterisk is actually still generating those notifications, but just not sending them anywhere. In this case the “full” log file will have warnings and errors, but no verbose messages even though you’ve enabled it.

1 Like

Thanks for such detailed explanation! Make sense, much clear now!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.