Skip to content

logging-bunyan: HttpRequest support#2325

Merged
stephenplusplus merged 3 commits intogoogleapis:masterfrom
ofrobots:bunyan-http-request
May 25, 2017
Merged

logging-bunyan: HttpRequest support#2325
stephenplusplus merged 3 commits intogoogleapis:masterfrom
ofrobots:bunyan-http-request

Conversation

@ofrobots
Copy link
Contributor

@ofrobots ofrobots commented May 22, 2017

If the bunyan provided metadata includes a httpRequest property, format
that as the HttpRequest message. This allows Stackdriver logging to
format request logs nicely.

Fixes: #2251

EDIT: note that this is semver-major.

If the bunyan provided metadata includes a httpRequest property, format
that as the HttpRequest message. This allows Stackdriver logging to
format request logs nicely.

Fixes: googleapis#2251
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 22, 2017

## Formatting Request Logs

To format your request logs you can provide a `httpRequest` property on the bunyan metadata you provide along with the log message. We will format this as the [`HttpRequest`][http-request-message] message and Stackdriver logging will show this as a request log. Example:

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.0e-05%) to 99.925% when pulling f224d05 on ofrobots:bunyan-http-request into d152416 on GoogleCloudPlatform:master.

@ofrobots
Copy link
Contributor Author

CI is green now. PTAL.

@stephenplusplus stephenplusplus merged commit 1a0b73a into googleapis:master May 25, 2017
@stephenplusplus
Copy link
Contributor

Cool, thanks!

@ofrobots ofrobots deleted the bunyan-http-request branch May 25, 2017 17:28
ofrobots added a commit to ofrobots/google-cloud-node that referenced this pull request May 25, 2017
If the winston provided metadata includes a httpRequest property,
format that as the HttpRequest message. This allows Stackdriver logging
to format request logs nicely.

Ref: googleapis#2325
ofrobots added a commit to ofrobots/google-cloud-node that referenced this pull request May 25, 2017
If the winston provided metadata includes a httpRequest property,
format that as the HttpRequest message. This allows Stackdriver logging
to format request logs nicely.

Ref: googleapis#2325
@travi
Copy link

travi commented May 26, 2017

thanks so much for this update! is there a release planned soon so i can give it a shot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging-bunyan cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants