Added debug more debug logging, saving every question that doesnt has a match with at leas 90%

This commit is contained in:
MrFry 2020-03-15 09:58:20 +01:00
parent a7a75bd9d4
commit d1e03f4c41
2 changed files with 23 additions and 18 deletions

View file

@ -71,10 +71,13 @@ function GetDateString () {
return GetRandomColor(m.getHours().toString()) + d + C()
}
function DebugLog (msg, lvl) {
function DebugLog (msg, name, lvl) {
if (lvl <= debugLevel) {
if (msg === 'hr') {
msg = hr
}
let s = msg
let header = C('red') + '#DEBUG ' + lvl + '#' + C() + DELIM + C()
let header = `${C('red')}#DEBUG${lvl}#${C('yellow')}${name.toUpperCase()}${C('red')}#${C()}${DELIM}${C()}`
if (typeof msg !== 'object') {
s = header + msg
} else {