Commit eaa00d8c authored by tbrehm's avatar tbrehm
Browse files

Fixed bug in sql logging.

parent d7f14d3f
...@@ -127,12 +127,14 @@ class app { ...@@ -127,12 +127,14 @@ class app {
fclose($fp); fclose($fp);
// Log to database // Log to database
$server_id = $conf['server_id']; if(isset($this->db)) {
$loglevel = $priority; $server_id = $conf['server_id'];
$tstamp = time(); $loglevel = $priority;
$message = $app->db->quote($msg); $tstamp = time();
$sql = "INSERT INTO sys_log (server_id,loglevel,tstamp,message) VALUES ('$server_id','$loglevel','$tstamp','$message')"; $message = $this->db->quote($msg);
$app->db->query($sql); $sql = "INSERT INTO sys_log (server_id,loglevel,tstamp,message) VALUES ('$server_id','$loglevel','$tstamp','$message')";
$this->db->query($sql);
}
//} else { //} else {
// die("Unable to write to logfile."); // die("Unable to write to logfile.");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment