mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
logger ability to disable all logs, rmduplicates logger disabling
This commit is contained in:
parent
d962abfbc2
commit
85408029b5
2 changed files with 11 additions and 3 deletions
src/standaloneUtils
|
@ -40,6 +40,7 @@ const logPath = './duplicateRemovingLog/'
|
|||
const globalLog = './duplicateRemovingLog/log'
|
||||
utils.CreatePath(logPath)
|
||||
utils.WriteFile('', globalLog)
|
||||
logger.setLoggingDisabled(true)
|
||||
|
||||
// ----------------------------------------------
|
||||
let currentMaxIndex = -1
|
||||
|
@ -309,7 +310,8 @@ function difference({ dbA, dbB }) {
|
|||
|
||||
for (let i = 0; i < dbA.length; i++) {
|
||||
const subj = dbA[i]
|
||||
const subjLogPath = logPath + subj.Name
|
||||
const subjLogPath =
|
||||
logPath + (subj.Name || `EMPTY SUBJ ${new Date().getTime()}`)
|
||||
utils.WriteFile('', subjLogPath)
|
||||
let removedCount = 0
|
||||
|
||||
|
@ -486,7 +488,7 @@ function printProgressBar(current, total) {
|
|||
for (let i = 0; i < xTotal - xCurrent; i++) {
|
||||
line += ' '
|
||||
}
|
||||
const numbers = `${current} / ${total}`
|
||||
const numbers = `${current.toLocaleString()} / ${total.toLocaleString()}`
|
||||
writeInSameLine(
|
||||
`${C('magenta')} [${line}]${C('green')} ${numbers}${C()}`,
|
||||
current !== total
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue