From 0734f4b4e0cf9a36254bb21caf3a5f0d69610644 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 9 Feb 2016 22:09:48 -0800 Subject: [PATCH] add debug log --- index.js | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/index.js b/index.js index 5a0026f..75e0b28 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ var bencode = require('bencode') var BitField = require('bitfield') +var debug = require('debug')('ut_metadata') var EventEmitter = require('events').EventEmitter var inherits = require('inherits') var sha1 = require('simple-sha1') @@ -114,6 +115,7 @@ module.exports = function (metadata) { ut_metadata.prototype.setMetadata = function (metadata) { if (this._metadataComplete) return true + debug('set metadata') // if full torrent dictionary was passed in, pull out just `info` key try { diff --git a/package.json b/package.json index f7a35ad..1df0676 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "bencode": "^0.7.0", "bitfield": "^1.0.1", + "debug": "^2.2.0", "inherits": "^2.0.1", "simple-sha1": "^2.0.0" },