-
Notifications
You must be signed in to change notification settings - Fork 309
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
Conversation
this allows users to pull data from journal entries that aren't MESSAGE
again- could probably wrap |
if err != nil || len(s) == 0 { | ||
break fields | ||
} | ||
s = s[:len(s)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need this?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@faiq Good idea.
There was a problem hiding this comment.
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
closing in favor of #152 |
this allows users to pull data from journal entries that aren't "MESSAGE"
would love to hear comments on this