mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:17:08 +00:00
Replace console output by debug functions
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
const { listen } = require('../ws/db');
|
||||
const channels = require('../lib/db/channels');
|
||||
const handlers = require('./handlers').init();
|
||||
const { ERROR, INFO, DEBUG } = require('DOUGAL_ROOT/debug')(__filename);
|
||||
|
||||
function start () {
|
||||
listen(channels, async function (data) {
|
||||
DEBUG("Incoming data", data);
|
||||
for (const handler of handlers) {
|
||||
// NOTE: We are intentionally passing the same instance
|
||||
// of the data to every handler. This means that earlier
|
||||
@@ -15,7 +17,7 @@ function start () {
|
||||
}
|
||||
});
|
||||
|
||||
console.log("Events manager started.", handlers.length, "active handlers");
|
||||
INFO("Events manager started.", handlers.length, "active handlers");
|
||||
}
|
||||
|
||||
module.exports = { start }
|
||||
|
||||
Reference in New Issue
Block a user