« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--man/http-music-crawl-http.15
-rwxr-xr-xsrc/crawl-http.js7
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'),