bug in Sys: fix???
I had the same problem and fixed it by changing the log method in upload/include/class.inc.php.
The problem is actualy in log method not filling the logger column in table ost_syslog, so I create the variable $logger and put the default value 'Not defined' in it. I also provided the new log function with the parameter $logger so one can actually use the new method as well.
Personaly think it is probable a better way to add the default value in the table itself, but leaving this decision to more experienced with osTicket.
Code changed:
function newlog($priority,$title,$message,$logger,$alert=true) {// variable $logger added
global $cfg;
.................. code omitted as remains same ................
//Save log based on system log level settings.
if($cfg && $cfg->getLogLevel()>=$level){
$loglevel=array(1=>'Error','Warning','Debug');
$sql='INSERT INTO '.SYSLOG_TABLE.' SET created=NOW(),updated=NOW() '.
',title='.db_input($title).
',log_type='.db_input($loglevel).
',log='.db_input($message).
',logger='.db_input($logger). // this has been added
',ip_address='.db_input($_SERVER);
//echo $sql;
// it should be good to add some error check :-)
$result = mysql_query($sql); //don't use db_query to avoid possible loop.
if (!$result) {
.....code omitted....
}
}
}
// new-old function
function log($priority,$title,$message,$alert=true) {
Sys:($priority,$title,$message,'Not Defined', $alert);
}