UNPKG

multipass-torrent

Version:

Collects torrents from various sources (dump, RSS, HTML pages) and associates the video files within with IMDB ID

21 lines (18 loc) 648 B
var cfg = require("./cfg"); // <infohash> <collect | process | retire | delete> <extra message> function logHash(hash, type, message) { // TODO we can log hashes individually here, as we receive messages on what is happening with them // currently retire and delete cannot be received since we don't clean our DB }; function logOther() { if (cfg.logLevel >= this.level) console[this.error ? "error" : "log"].apply(console, arguments) }; module.exports = { hash: logHash, message: logOther.bind({ level: 3}), warning: logOther.bind({ level: 2 }), error: logOther.bind({ level: 1, error: true }), important: logOther.bind({ level: 0 }), };