0

How do I force request.js to log requests completely?

Now some parts of the request are obscured by '[Object]' literals:

REQUEST { uri: 'https://example.org',
  method: 'POST',
  headers: 
   { 'Content-Type': 'application/json'},
  json: 
   { foo: 
      { bar: [Object]},
  callback: [Function] }

I enable logging via NODE_DEBUG='request'

Andrej
  • 1,679
  • 1
  • 26
  • 40
  • Possible duplicate of [How can I get the full object in Node.js's console.log(), rather than '\[Object\]'?](https://stackoverflow.com/questions/10729276/how-can-i-get-the-full-object-in-node-jss-console-log-rather-than-object) – 1565986223 Apr 29 '19 at 05:15
  • @1556089774 Thanks! I wouldn't call it duplicate but one [answer](https://stackoverflow.com/a/41882441/694770) was helpful: `require("util").inspect.defaultOptions.depth=null` – Andrej Apr 29 '19 at 05:27

0 Answers0