]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjproject: Add ability to map pjproject log levels to Asterisk log levels 45/2245/7
authorGeorge Joseph <george.joseph@fairview5.com>
Sun, 7 Feb 2016 23:34:20 +0000 (16:34 -0700)
committerGeorge Joseph <george.joseph@fairview5.com>
Thu, 18 Feb 2016 22:30:18 +0000 (16:30 -0600)
commit6b921f706d493f926c3bceb44775aa71bdc5e225
tree3ea44b98f0b0e81a0f69076dda19b3f7f596695b
parent37c273f0de946282e69c0a6166b955eb3b4f8c2e
res_pjproject:  Add ability to map pjproject log levels to Asterisk log levels

Warnings and errors in the pjproject libraries are generally handled by
Asterisk.  In many cases, Asterisk wouldn't even consider them to be warnings
or errors so the messages emitted by pjproject directly are either superfluous
or misleading.  A good exampe of this are the level-0 errors pjproject emits
when it can't open a TCP/TLS socket to a client to send an OPTIONS.  We don't
consider a failure to qualify a UDP client an "ERROR", why should a TCP/TLS
client be treated any differently?

A config file for res_pjproject has bene added (pjproject.conf) and a new
log_mappings object allows mapping pjproject levels to Asterisk levels
(or nothing).  The defaults if no pjproject.conf file is found are the same
as those that were hard-coded into res_pjproject initially: 0,1 = LOG_ERROR,
2 = LOG_WARNING, 3,4,5 = LOG_DEBUG<level>

Change-Id: Iba7bb349c70397586889b8f45b8c3d6c6c8c3898
CHANGES
configs/samples/pjproject.conf.sample [new file with mode: 0644]
res/res_pjproject.c