Skip to content
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

sdjournal: adds a follow with fields #151

Closed
wants to merge 4 commits into from
Closed

Conversation

faiq
Copy link

@faiq faiq commented Apr 25, 2016

this allows users to pull data from journal entries that aren't "MESSAGE"

would love to hear comments on this

this allows users to pull data from journal entries that aren't MESSAGE
@faiq
Copy link
Author

faiq commented Apr 25, 2016

again- could probably wrap Follow with FollowWithFields

if err != nil || len(s) == 0 {
break fields
}
s = s[:len(s)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need this?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for reviewing.

The EnumerateData call allows us to walk over all the different fields in the journal file. Now that I think about it, this can likely be done with multiple calls to GetData as well. Which would likely make it more efficient

Copy link
Contributor

Choose a reason for hiding this comment

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

@faiq Good idea.

Copy link
Author

Choose a reason for hiding this comment

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

Actually in retrospect, i think this method should be called FollowWithAllFields because many people end up using custom fields in their journal entries. This allows the user to have the option to filter or not.

I think the best way of doing so would be taking out the fields map[string]struct{} parameter to the function

@faiq faiq mentioned this pull request Apr 27, 2016
@faiq
Copy link
Author

faiq commented Apr 28, 2016

closing in favor of #152

@faiq faiq closed this Apr 28, 2016
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.

None yet

2 participants