mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added debug more debug logging, saving every question that doesnt has a match with at leas 90%
This commit is contained in:
parent
a7a75bd9d4
commit
d1e03f4c41
2 changed files with 23 additions and 18 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue