Changeset 6059
- Timestamp:
- 07/19/08 08:20:19 (3 months ago)
- Files:
-
- freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php (modified) (3 diffs)
- freepbx/trunk/amportal.conf (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php
r5969 r6059 33 33 'FOPPASSWORD' => array('std' , 'passw0rd'), 34 34 'FOPSORT' => array('std' , 'extension'), 35 'AMPSYSLOGLEVEL '=> array('std' , 'LOG_ERR'), 35 36 36 37 'ASTETCDIR' => array('dir' , '/etc/asterisk'), … … 60 61 'USEDEVSTATE' => array('bool' , false), 61 62 'MODULEADMINWGET'=> array('bool' , false), 63 'AMPDISABLELOG'=> array('bool' , true), 64 'AMPENABLEDEVELDEBUG'=> array('bool' , false), 62 65 ); 63 66 … … 3505 3508 */ 3506 3509 function freepbx_log($section, $level, $message) { 3507 global $db; 3508 global $debug; // This is used by retrieve_conf 3509 global $amp_conf; 3510 global $db; 3511 global $debug; // This is used by retrieve_conf 3512 global $amp_conf; 3513 3514 if (isset($debug) && ($debug != false)) { 3515 print "[DEBUG-$section] ($level) $message\n"; 3516 } 3517 if (!$amp_conf['AMPENABLEDEVELDEBUG'] && strtolower(trim($level)) == 'devel-debug') { 3518 return true; 3519 } 3510 3520 3511 if (!isset($amp_conf['AMPDISABLELOG']) || ($amp_conf['AMPDISABLELOG'] != 'true')) { 3512 $sth = $db->prepare("INSERT INTO freepbx_log (time, section, level, message) VALUES (NOW(),?,?,?)"); 3513 $db->execute($sth, array($section, $level, $message)); 3514 } 3515 if (isset($debug) && ($debug != false)) 3516 print "[DEBUG-$section] ($level) $message\n"; 3521 if (!$amp_conf['AMPDISABLELOG']) { 3522 switch (strtoupper($amp_conf['AMPSYSLOGLEVEL'])) { 3523 case 'LOG_EMERG': 3524 syslog(LOG_EMERG,"FreePBX-[$level][$section] $message"); 3525 break; 3526 case 'LOG_ALERT': 3527 syslog(LOG_ALERT,"FreePBX-[$level][$section] $message"); 3528 break; 3529 case 'LOG_CRIT': 3530 syslog(LOG_CRIT,"FreePBX-[$level][$section] $message"); 3531 break; 3532 case 'LOG_ERR': 3533 syslog(LOG_ERR,"FreePBX-[$level][$section] $message"); 3534 break; 3535 case 'LOG_WARNING': 3536 syslog(LOG_WARNING,"FreePBX-[$level][$section] $message"); 3537 break; 3538 case 'LOG_NOTICE': 3539 syslog(LOG_NOTICE,"FreePBX-[$level][$section] $message"); 3540 break; 3541 case 'LOG_INFO': 3542 syslog(LOG_INFO,"FreePBX-[$level][$section] $message"); 3543 break; 3544 case 'LOG_DEBUG': 3545 syslog(LOG_DEBUG,"FreePBX-[$level][$section] $message"); 3546 break; 3547 case 'SQL': 3548 case 'LOG_SQL': 3549 default: 3550 $sth = $db->prepare("INSERT INTO freepbx_log (time, section, level, message) VALUES (NOW(),?,?,?)"); 3551 $db->execute($sth, array($section, $level, $message)); 3552 break; 3553 } 3554 3555 } 3517 3556 } 3518 3557 freepbx/trunk/amportal.conf
r5967 r6059 147 147 SERVERINTITLE=false 148 148 149 # USEDEVSTATE = true DEFAULT VALUE false149 # USEDEVSTATE = true|false # DEFAULT VALUE false 150 150 # If this is set, it assumes that you are running Asterisk 1.4 or higher and want to take advantage of the 151 151 # func_devstate.c backport available from Asterisk 1.6 which allows custom hints to be created to support … … 154 154 USEDEVSTATE=true 155 155 156 # MODULEADMINWGET=true DEFAULT VALUE false156 # MODULEADMINWGET=true|false # DEFAULT VALUE false 157 157 # Module Admin normally tries to get its online information through direct file open type calls to URLs that 158 158 # go back to the freepbx.org server. If it fails, typically because of content filters in firewalls that don't … … 163 163 # 164 164 MODULEADMINWGET=true 165 166 # AMPDISABLELOG=true|false # DEFAULT VALUE true 167 # Whether or not to invoke the freepbx log facility 168 169 # AMPSYSLOGLEVEL=LOG_EMERG|LOG_ALERT|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_NOTICE|LOG_INFO|LOG_DEBUG|LOG_SQL|SQL # DEFAULT VALUE LOG_ERR 170 # Where to log if enabled, SQL, LOG_SQL logs to old MySQL table, others are passed to syslog system to determine where to log 171 172 # AMPENABLEDEVELDEBUG=true|false # DEFAULT VALUE false 173 # Whether or not to include log messages marked as 'devel-debug' in the log system 174
