summaryrefslogtreecommitdiff
path: root/configs/samples/pjproject.conf.sample
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-11-23 18:27:54 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-11-30 13:11:48 -0600
commit1dfa11b65cd3bd768605eb7779214e4330f52ed3 (patch)
tree7ff2db3895e43802070509ba0b7cf8b3229065dd /configs/samples/pjproject.conf.sample
parenta0c0b1c9cb01db6b1b968efc01ff43a7f492795e (diff)
PJPROJECT logging: Made easier to get available logging levels.
Use of the new logging is as simple as issuing the new CLI command or setting the new pjproject.conf option. Other options that can affect the logging are how you have the pjproject log levels mapped to Asterisk log types in pjproject.conf and if you have configured Asterisk to log the DEBUG type messages. Altering the pjproject.conf level mapping shouldn't be necessary for most installations as the default mapping is sensible. Configuring Asterisk to log the DEBUG message type is standard practice for collecting debug information. * Added CLI "pjproject set log level" command to dynamically adjust the maximum pjproject log message level. * Added CLI "pjproject show log level" command to see the currently set maximum pjproject log message level. * Added pjproject.conf startup section "log_level" option to set the initial maximum pjproject log message level so all messages could be captured from initialization. * Set PJ_LOG_MAX_LEVEL to 6 to compile in all defined logging levels into bundled pjproject. Pjproject will use the currently set run time log level to determine if a log message is generated just like Asterisk verbose and debug logging levels. * In log_forwarder(), made always log enabled and mapped pjproject log messages. DEBUG mapped log messages are no longer gated by the current Asterisk debug logging level. * Removed RAII_VAR() from res_pjproject.c:get_log_level(). ASTERISK-26630 #close Change-Id: I6dca12979f482ffb0450aaf58db0fe0f6d2e5389
Diffstat (limited to 'configs/samples/pjproject.conf.sample')
-rw-r--r--configs/samples/pjproject.conf.sample25
1 files changed, 23 insertions, 2 deletions
diff --git a/configs/samples/pjproject.conf.sample b/configs/samples/pjproject.conf.sample
index 97af7345f..82c81a1f6 100644
--- a/configs/samples/pjproject.conf.sample
+++ b/configs/samples/pjproject.conf.sample
@@ -1,15 +1,36 @@
; Common pjproject options
;
+;[startup]
+; NOTES: The name of this section in the pjproject.conf configuration file must
+; remain startup or the configuration will not be applied.
+;
+;log_level=default ; Initial maximum pjproject logging level to log
+ ; Valid values are: 0-6, and default
+ ;
+ ; Note: This option is needed very early in the startup
+ ; process so it can only be read from config files because
+ ; the modules for other methods have not been loaded yet.
+;type= ; Must be of type startup (default: "")
+
;========================LOG_MAPPINGS SECTION OPTIONS===============================
;[log_mappings]
; SYNOPSIS: Provides pjproject to Asterisk log level mappings.
; NOTES: The name of this section in the pjproject.conf configuration file must
; remain log_mappings or the configuration will not be applied.
; The defaults mentioned below only apply if this file or the 'log_mappings'
-; object can'tbe found. If the object is found, there are no defaults. If
+; object can't be found. If the object is found, there are no defaults. If
; you don't specify an entry, nothing will be logged for that level.
;
+; These logging level meanings are typically used by pjproject:
+; - 0: fatal error
+; - 1: error
+; - 2: warning
+; - 3: info
+; - 4: debug
+; - 5: trace
+; - 6: more detailed trace
+;
;asterisk_error = ; A comma separated list of pjproject log levels to map to
; Asterisk errors.
; (default: "0,1")
@@ -24,5 +45,5 @@
; (default: "")
;asterisk_debug = ; A comma separated list of pjproject log levels to map to
; Asterisk debug
- ; (default: "3,4,5")
+ ; (default: "3,4,5,6")
;type= ; Must be of type log_mappings (default: "")