update Mi 17. Jun 20:01:01 CEST 2020

This commit is contained in:
Robert Richter 2020-06-17 20:01:01 +02:00
parent 057b6ca44c
commit 488a2ef6af

View File

@ -501,11 +501,15 @@ module.exports = function (db, app_cfg) {
function db_log(typ, text) { function db_log(typ, text) {
// Debug Eintraege nur bei Development speichern // Debug Eintraege nur bei Development speichern
var do_log = true; var do_log = true;
if (typ.match(/debug/i)) { var debug_regex = new RegExp('debug', 'gi');
if (typ.match(debug_regex)) {
do_log = app_cfg.global.development; do_log = app_cfg.global.development;
} else { } else {
do_log = app_cfg.global.development; do_log = app_cfg.global.development;
}; };
console.log(typ);
console.log();
// Log-Eintrag schreiben // Log-Eintrag schreiben
if (do_log) { if (do_log) {
db.run(`INSERT INTO waip_log (log_typ, log_text) db.run(`INSERT INTO waip_log (log_typ, log_text)