1

I'm using winston logger to log my next js application and I'm trying to output a json object. However, when I do so, the json object within the message field is not collapsible because it is interpreted as a string.

enter image description here

In my code, I am just logging it with JSON stringify. What is the correct way to do this, as the other fields are collapsible?

const json = { label: 'Component Props', data: {} };
logger.info(JSON.stringify(json), metaData);
usr4896260
  • 1,427
  • 3
  • 27
  • 50

0 Answers0