]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/cmd.php
timestamp info message and repeat warnings at end
[nominatim.git] / lib / cmd.php
index 37ba87b8a51c69e38ca0758d378292f61590f756..d7ba285d431b8ab1e1a594b75c84abe31fc11498 100644 (file)
@@ -128,3 +128,23 @@ function chksql($oSql, $sMsg = false)
 
     return $oSql;
 }
+
+function info($sMsg)
+{
+    echo date('Y-m-d H:i:s == ').$sMsg."\n";
+}
+
+$aWarnings = [];
+
+function warn($sMsg)
+{
+    $GLOBALS['aWarnings'][] = $sMsg;
+    echo date('Y-m-d H:i:s == ').'WARNING: '.$sMsg."\n";
+}
+
+function repeatWarnings()
+{
+    foreach ($GLOBALS['aWarnings'] as $sMsg) {
+        echo '  * ',$sMsg."\n";
+    }
+}