[asterisk-users] Logging different verbosity levels

Antony Stone Antony.Stone at asterisk.open.source.it
Fri May 20 08:33:45 CDT 2022


Hi.

I'm trying to use different logging verbosity levels to get dialplan output 
into different log files, and there's clearly something I haven't understood 
about how Asterisk does this...


I have the following in /etc/asterisk/logger.conf:

[logfiles]
logtest.verbose.0 => verbose(0)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.1 => verbose(1)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.2 => verbose(2)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.3 => verbose(3)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.4 => verbose(4)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.5 => verbose(5)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.6 => verbose(6)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.7 => verbose(7)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.8 => verbose(8)                                                                                                                                                                                                                                                                                                                                         
logtest.verbose.9 => verbose(9)

I then put the following at a particular point in my dialplan:

same => n,Verbose(0,Test message verbosity 0)                                                                                                                                                                                                                                                                                                                           
same => n,Verbose(1,Test message verbosity 1)
same => n,Verbose(2,Test message verbosity 2)
same => n,Verbose(3,Test message verbosity 3)
same => n,Verbose(4,Test message verbosity 4)
same => n,Verbose(5,Test message verbosity 5)
same => n,Verbose(6,Test message verbosity 6)
same => n,Verbose(7,Test message verbosity 7)
same => n,Verbose(8,Test message verbosity 8)
same => n,Verbose(9,Test message verbosity 9)

I was expecting to get each message output into the respective filename, but 
instead I got 10 files with the expected filenames, and all containing every 
test message, no matter which verbosity level it was output at.

I'm sure there's just something basic which I haven't understaood from

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Verbose

and

https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration


Can someone please show me what I'm missing, so that I can get each 
Verbose(N,Message) dialplan command to send its message into the log file 
numbered N?


Thanks,


Antony.

-- 
Anyone that's normal doesn't really achieve much.

 - Mark Blair, Australian rocket engineer

                                                   Please reply to the list;
                                                         please *don't* CC me.



More information about the asterisk-users mailing list