microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
320 stars 138 forks source link

Nested object iside array returns [Object] when using info.message #1251

Closed artur-grigoryan-cgn closed 6 months ago

artur-grigoryan-cgn commented 6 months ago

Hi, I'm using Strapi with winstor 3.11. When i log this: logger.error([{ a: "a", b: "b" }, { a: "a", b: "b" }, { c: [{ a: "a" },3] }]); I get the followng the following output: [LOGGER] 13.12.2023 - 09:48:42 error : [ { a: 'a', b: 'b' }, { a: 'a', b: 'b' }, { c: [ [Object], 3 ] } ]

It only appears in the console when I'm using ${info.message}. Example:

  winston.format.printf(
    info => ` ${info.label}  ${info.timestamp}  ${info.level} : ${info.message}`
  )