mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-03-15 18:30:49 +00:00
Better logging
This commit is contained in:
parent
a86f02919d
commit
cb0bb1ddc8
@ -8,6 +8,7 @@ Y Lists have listeners and generate events - see docs at ...
|
|||||||
|
|
||||||
const WebTorrent = require('webtorrent');
|
const WebTorrent = require('webtorrent');
|
||||||
const stream = require('readable-stream');
|
const stream = require('readable-stream');
|
||||||
|
const Url = require('url');
|
||||||
|
|
||||||
// Other Dweb modules
|
// Other Dweb modules
|
||||||
const errors = require('./Errors'); // Standard Dweb Errors
|
const errors = require('./Errors'); // Standard Dweb Errors
|
||||||
@ -235,7 +236,7 @@ class TransportWEBTORRENT extends Transport {
|
|||||||
:resolves to: f({start, end}) => stream (The readable stream.)
|
:resolves to: f({start, end}) => stream (The readable stream.)
|
||||||
:throws: TransportError if url invalid - note this happens immediately, not as a catch in the promise
|
:throws: TransportError if url invalid - note this happens immediately, not as a catch in the promise
|
||||||
*/
|
*/
|
||||||
if (verbose) console.log("TransportWEBTORRENT p_f_createreadstream %o", url);
|
if (verbose) console.log("TransportWEBTORRENT p_f_createreadstream %o", Url.parse(url).href);
|
||||||
try {
|
try {
|
||||||
let filet = await this._p_fileTorrentFromUrl(url);
|
let filet = await this._p_fileTorrentFromUrl(url);
|
||||||
let self = this;
|
let self = this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user