Set the DEBUG env var to print verbose logs (including GraphicsMagick commands etc)

pull/58/head
Romain 7 years ago
parent 8dccb88f25
commit cc280a2180

@ -92,6 +92,14 @@ The optional JSON config should contain a single object with one key per argumen
We welcome all [issues](https://github.com/thumbsup/node-thumbsup/issues)
and [pull requests](https://github.com/thumbsup/node-thumbsup/pulls)!
If you are facing any issues or getting crashes, you can run `thumbsup` in debug mode
to get a verbose troubleshooting log of all operations:
```bash
DEBUG="*" thumbsup [options]
```
Please make sure the tests are passing when submitting a code change:
```bash

@ -3,6 +3,7 @@ var path = require('path');
var pad = require('pad');
var async = require('async');
var progress = require('./progress');
const debug = require('debug')('thumbsup')
exports.exec = function(input, output, collection, options, callback) {
var message = pad(options.message, 20)
@ -28,6 +29,7 @@ exports.exec = function(input, output, collection, options, callback) {
if (process.length > 0) {
var ops = process.map(function(task) {
return function(next) {
debug(`Transforming ${task.src} into ${task.dest}`)
fs.mkdirpSync(path.dirname(task.dest));
options.func(task, function(err) {
bar.tick();

Loading…
Cancel
Save