mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Expose libvips warnings via NODE_DEBUG env var
This commit is contained in:
@@ -24,6 +24,9 @@ let versions = {
|
||||
} catch (err) {}
|
||||
})();
|
||||
|
||||
// Use NODE_DEBUG=sharp to enable libvips warnings
|
||||
const debuglog = util.debuglog('sharp');
|
||||
|
||||
/**
|
||||
* @class Sharp
|
||||
*
|
||||
@@ -174,6 +177,8 @@ const Sharp = function (input, options) {
|
||||
tiffSquash: false,
|
||||
tileSize: 256,
|
||||
tileOverlap: 0,
|
||||
// Function to notify of libvips warnings
|
||||
debuglog: debuglog,
|
||||
// Function to notify of queue length changes
|
||||
queueListener: function (queueLength) {
|
||||
queue.emit('change', queueLength);
|
||||
|
||||
Reference in New Issue
Block a user