Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit 1946565

Browse files
committed
Decrease log level for flushing. Improve logger naming.
1 parent f41405b commit 1946565

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Replicator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const pMap = require('p-map')
33
const Log = require('ipfs-log')
44

55
const Logger = require('logplease')
6-
const logger = Logger.create("orbit-db.replicator", { color: Logger.Colors.Cyan })
6+
const logger = Logger.create("replicator", { color: Logger.Colors.Cyan })
77
Logger.setLogLevel('ERROR')
88

99
const getNext = e => e.next
@@ -35,7 +35,7 @@ class Replicator extends EventEmitter {
3535
// Flush the queue as an emergency switch
3636
this._flushTimer = setInterval(() => {
3737
if (this.tasksRunning === 0 && Object.keys(this._queue).length > 0) {
38-
logger.error("Had to flush the queue!", Object.keys(this._queue).length, "items in the queue, ", this.tasksRequested, this.tasksFinished, " tasks requested/finished")
38+
logger.warn("Had to flush the queue!", Object.keys(this._queue).length, "items in the queue, ", this.tasksRequested, this.tasksFinished, " tasks requested/finished")
3939
setTimeout(() => this._processQueue(), 0)
4040
}
4141
}, 3000)

0 commit comments

Comments
 (0)