Skip to content

Additional flags in Frame.toString() #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2016

Conversation

NiteshKant
Copy link
Contributor

Problem

Currently Frame.toString() does not print the various flags associated with different frame types. eg: requestN value in RequestN frame. This limits the usefulness of frame logging.

Modifications

Added additionalFlags string which is generated per frame type.

Result

More insight for frame logging.

#### Problem

Current `Frame.toString()` does not print the various flags associated with different frame types. eg: `requestN` value in `RequestN` frame. This limits the usefulness of frame logging.

#### Modifications

Added `additionalFlags` string which is generated per frame type.

#### Result

More insight for frame logging.
Copy link
Member

@stevegury stevegury left a comment

Choose a reason for hiding this comment

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

LGTM

@stevegury stevegury merged commit 153ebea into rsocket:0.5.x Nov 18, 2016

switch (type) {
case LEASE:
additionalFlags = " Permits: " + Lease.numberOfRequests(this) + ", TTL: " + Lease.ttl(this);
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit inconsistent as you don't use , as a separator in the normal toString values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aah I didn't notice that. I will fix it in the next change I do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI #198 contains this formatting change.

@NiteshKant NiteshKant deleted the 0.5.x-frame-tostring branch November 18, 2016 19:21
NiteshKant added a commit that referenced this pull request Dec 8, 2016
#### Problem

Current `Frame.toString()` does not print the various flags associated with different frame types. eg: `requestN` value in `RequestN` frame. This limits the usefulness of frame logging.

#### Modifications

Added `additionalFlags` string which is generated per frame type.

#### Result

More insight for frame logging.
ilayaperumalg pushed a commit to ilayaperumalg/rsocket-java that referenced this pull request Dec 26, 2017
Based on feedback, adopting the style of description used by HTTP/2 (http://httpwg.org/specs/rfc7540.html#FrameHeader) and specifically showing the first bit of 32-bit and 64-bit numbers to always be 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants