nodejs-logging icon indicating copy to clipboard operation
nodejs-logging copied to clipboard

Child logs: not text searchable, errors not propagated.

Open jgunn987 opened this issue 5 years ago • 4 comments

When using the express middleware, logs that are grouped together on a request seem have a couple of issues,

  1. Child logs are not searchable through the log viewer
  2. Child errors are not propagated to the parent request log. An error in one child log should raise an error on the parent.

When analysing the log i see that there is a missing 'line' array on the 'protoPayload'. With our Java apps these two issues do not occur.

Environment details

  • OS: Appengine
  • Node.js version: nodejs10
  • npm version: 6.4.1
  • @google-cloud/logging version: 5.5.2

Steps to reproduce

  1. Follow the code sample for creating an express middleware with either bunyan or winston libraries.

jgunn987 avatar Dec 11 '19 11:12 jgunn987

@jgunn987 thanks for the bug report; I'm not sure if this is a bug, or a limitation of the API, I'll leave it to @soldair to triage.

bcoe avatar Dec 12 '19 22:12 bcoe

@bcoe I guess this could be classed as a feature request as I know the API does support this(the Java libs do not have this problem and they use the same API).

jgunn987 avatar Dec 19 '19 13:12 jgunn987

@jgunn987 we're not working on feature requests for logging winston or bunyan at this time. If this is a bug we'll need working repro examples, details about how you expect the results to be presented, and a working example of this using this respository nodejs-logging

soldair avatar Jan 02 '20 23:01 soldair

@jgunn987 @soldair was about to follow up as well, I think this does sound like a feature request; If I understand correctly, when logging with java, there's a line array that's populated? whereas we don't populate this meta information in Node.js?

What does the line array represent in the Java library?

bcoe avatar Jan 02 '20 23:01 bcoe