I am using winston to log my things in my application.I would like to be able to insert a unique ID to each log related to the same request so that I can easily extract and analyze the logs for a single request, otherwise it happens that they get interspersed and it is really hard to go and see what happenend.How could I do this?http req1 -> log_id1 http req2 -> log_id2 [...]so I could get something like:log_id1: processing headers log_id2: processing headers log_id2: parsing log_id1: parsing log_id2: evaluating expression log_id2: calculating result log_id1: error, field not found
Submitted May 12, 2017 at 02:03PM by honestserpent
No comments:
Post a Comment