Skip to content
Snippets Groups Projects
Commit 2534b971 authored by vogelor's avatar vogelor
Browse files

Improved the replication error messages

parent 67fbfc01
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ class modules { ...@@ -109,7 +109,7 @@ class modules {
$app->db->query($sql); $app->db->query($sql);
if($app->db->errorNumber > 0) { if($app->db->errorNumber > 0) {
$replication_error = true; $replication_error = true;
$app->log("Replication failed. Error: ".$app->db->errorMessage,LOGLEVEL_ERROR); $app->log("Replication failed. Error: (" . $d[dbtable] . ") " . $app->db->errorMessage,LOGLEVEL_ERROR);
} }
$app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG); $app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG);
} }
...@@ -125,7 +125,7 @@ class modules { ...@@ -125,7 +125,7 @@ class modules {
$app->db->query($sql); $app->db->query($sql);
if($app->db->errorNumber > 0) { if($app->db->errorNumber > 0) {
$replication_error = true; $replication_error = true;
$app->log("Replication failed. Error: ".$app->db->errorMessage,LOGLEVEL_ERROR); $app->log("Replication failed. Error: (" . $d[dbtable] . ") " . $app->db->errorMessage,LOGLEVEL_ERROR);
} }
$app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG); $app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG);
} }
...@@ -137,7 +137,7 @@ class modules { ...@@ -137,7 +137,7 @@ class modules {
$app->db->query($sql); $app->db->query($sql);
if($app->db->errorNumber > 0) { if($app->db->errorNumber > 0) {
$replication_error = true; $replication_error = true;
$app->log("Replication failed. Error: ".$app->db->errorMessage,LOGLEVEL_ERROR); $app->log("Replication failed. Error: (" . $d[dbtable] . ") " . $app->db->errorMessage,LOGLEVEL_ERROR);
} }
$app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG); $app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment