diff options
author | Florrie <towerofnix@gmail.com> | 2018-02-12 19:28:49 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-02-12 19:30:58 -0400 |
commit | fe65f1777f130ec9d61c5ce06532a551b5dcc899 (patch) | |
tree | a7691c4dba8ef3fc10b4971998e8712ef1ceb4c5 | |
parent | 60d4ac4b28eee349070ad0930330654e2d67e27d (diff) |
Make it reasonable to have crawl-http save to a file while verbosely logging
-rw-r--r-- | man/http-music-crawl-http.1 | 5 | ||||
-rwxr-xr-x | src/crawl-http.js | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/man/http-music-crawl-http.1 b/man/http-music-crawl-http.1 index 1f96fc6..24b6980 100644 --- a/man/http-music-crawl-http.1 +++ b/man/http-music-crawl-http.1 @@ -73,3 +73,8 @@ As you can see, the resulting playlist file follows the same structure as the di .BR -m ", " --max-download-attempts Sets the maximum number of times any single directory will be attempted to be downloaded, when the HTTP download request fails. Defaults to 5. + +.TP +.BR -v ", " --verbose +Outputs potentially-useful debugging information regarding what files and links are (and aren't) being followed. +Note that log output goes to STDERR, so you can still pipe STDOUT to a file to save the resulting playlist. diff --git a/src/crawl-http.js b/src/crawl-http.js index b40ed02..5a4932d 100755 --- a/src/crawl-http.js +++ b/src/crawl-http.js @@ -36,7 +36,7 @@ function crawl(absURL, opts = {}, internals = {}) { const verboseLog = text => { if (verbose) { - console.log(text) + console.error(text) } } @@ -203,7 +203,10 @@ async function main(args, shouldReturn = false) { // such. Defaults to false. verbose = true - console.log('Outputting verbosely.') + console.error( + 'Outputting verbosely. (Log output goes to STDERR - ' + + 'you can still pipe to a file to save your playlist.)' + ) }, 'v': util => util.alias('-verbose'), |