Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd ability to filter log entries by range of log levels #5667
Conversation
lmtierney
added
the
C-java
label
May 30, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
shs96c
Jun 15, 2018
Member
Would it not be nicer to pass in a Predicate<LogEntry>? That way you can just use a normal Java streams to deal with these.
|
Would it not be nicer to pass in a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
shs96c
Jun 15, 2018
Member
Looking closer, LogEntries.getAll().stream().filter(entry -> true).collect(Collectors.toList()) would allow this, right? And then it becomes easier to add your own filters too.
|
Looking closer, |
shs96c
added
the
R-awaiting answer
label
Jun 15, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
valfirst
Jun 15, 2018
Contributor
Would it not be nicer to pass in a Predicate? That way you can just use a normal Java streams to deal with these.
I can make private List<LogEntry> filter(Predicate<LogEntry> logEntryPredicate) public. Or do you propose to do not add methods filtering by levels at all?
The root cause of this PR: I've started using LogEntries, applied filter(Level.WARNING) and expected to get only warnings (who reads javadocs
I can make
|
valfirst commentedMar 22, 2018
•
edited by andreastt
Xin the preceding checkbox, I verify that I have signed the Contributor License AgreementThis change is