trickle-observe 0.2.109 → 0.2.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/express.js CHANGED
@@ -181,6 +181,11 @@ function wrapExpressHandler(handler, routeName, opts) {
181
181
  return next(err);
182
182
  }
183
183
  };
184
+ const debug = process.env.TRICKLE_DEBUG === '1';
185
+ if (debug) {
186
+ const hs = handler.toString().substring(0, 200);
187
+ process.stderr.write(`[trickle/express-wrap] Calling handler: ${hs.replace(/\n/g, '\\n')}\n`);
188
+ }
184
189
  try {
185
190
  const result = handler.call(this, req, res, wrappedNext);
186
191
  // Handle async handlers that return a promise