datalust / winston-seq

A Winston v3 transport for Seq
Apache License 2.0
13 stars 3 forks source link

Console and Seq transporter in combination #19

Open invariants opened 3 months ago

invariants commented 3 months ago

Hi,

i am a new user of the Seq Server and i am confused how to have structured logging to Seq while also having useful console log messages. Using the provided examples i can now log something like log.info("Hello {planet}", {planet}) to Seq as "Hello Earth". But this of course dosn't work with the normal console transporter and is then logged to console as "Hello {planet}".

On the other hand log.info(`Hello ${planet}`) wont be logged structurally to Seq. Is there an easy way to have both?

Regards

liammclennan commented 3 months ago

Winston doesn't support message templates or any other standard that would do what you want. The best console output I can get is:

info: Hello {planet} { "planet": "World" }

Probably this could be fixed with another custom transport.