Skip to content

Conversation

@mariosangiorgio
Copy link
Contributor

Motivation:

I was analyzing some logs produced by grpc-swift but some of the messages lack structure, making it more difficult than it should be to run queries on the logs.

SwiftLog supports structured logging and its API allow us to log a message and some metadata associated to it.
Keeping the message string constant and logging the variable pieces of information as metadata, the logs produced by grpc-swift are going to be more easily analysed and processed.

Modifications:

This commit changes the logging calls where we had a variable message to have a constant message. The variable pieces of information are stored as metadata.

Result:

grpc-swift will produce log messages that can be analyzed and processed more easily.

Motivation:

I was analyzing some logs produced by grpc-swift but some of
the messages lack structure, making it more difficult than it
should be to run queries on the logs.

SwiftLog supports structured logging and its API allow us to
log a message and some metadata associated to it.
Keeping the message string constant and logging the variable
pieces of information as metadata, the logs produced by grpc-swift
are going to be more easily analysed and processed.

Modifications:

This commit changes the logging calls where we had a variable
message to have a constant message. The variable pieces of information
are stored as metadata.

Result:

grpc-swift will produce log messages that can be analyzed and processed
more easily.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 10, 2020

CLA Check
The committers are authorized under a signed CLA.

@glbrntt glbrntt added nio 🔨 semver/patch No public API change. labels Feb 10, 2020
Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mariosangiorgio -- I left a couple of casing suggestions inline, looks great otherwise.

mariosangiorgio and others added 3 commits February 10, 2020 11:42
Co-Authored-By: George Barnett <gbrntt@gmail.com>
Co-Authored-By: George Barnett <gbrntt@gmail.com>
Co-Authored-By: George Barnett <gbrntt@gmail.com>
@mariosangiorgio
Copy link
Contributor Author

@glbrntt thanks for spotting the wrong casing and the suggested fixed!

Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @mariosangiorgio

@glbrntt glbrntt merged commit 8839f8e into grpc:nio Feb 10, 2020
@mariosangiorgio mariosangiorgio deleted the structured-connection-logs branch February 10, 2020 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants