Closed SivaAccionLabs closed 6 years ago
@anthonycorbacho @paulwellnerbou @ottobackwards Please review and merge this PR.
First, thanks for the contribution. I have a couple of questions, not just for you but for the others as well:
setOrderedCaptures(boolean)
, then have a function
private Map<String,Object> createCaptureMap() { if (orderCaptures) { return new LinkedHashMap<>(); } return new HashMap<>(); }
2. I'm not sure that the documentation should be changed to LinkedHashMap
3. I would expect unit tests for this or any change to be included.
@ottobackwards Thank you so much for the review. This is the most urgent and important fix for our project.
@ottobackwards Have removed the changes in the documentation and made changes in the unit tests. Please review. Thanks.
Thanks @SivaMaplelabs, could you change the tests or add new tests the specifically test that the map iteration matches the capture order? That is the point.
@ottobackwards Following lines test the "preserve order". https://github.com/thekrakken/java-grok/pull/106/files#diff-706258725dfb91a78f94974320bde826R57 https://github.com/thekrakken/java-grok/pull/106/files#diff-706258725dfb91a78f94974320bde826R72 Thanks
@SivaMaplelabs , looks great. Unfortunately I don't have rights to publish it, I would have to create an own version again, as I did with https://github.com/paulwellnerbou/java-grok/releases/tag/0.1.8 and https://bintray.com/paulwellnerbou/maven/java-grok/0.1.8
@anthonycorbacho Could you please review and merge this PR?
Hi,
Sure i will do it after landing, it will be in couple of hours.
On Wed, 3 Oct 2018 at 8:54 AM SivaMaplelabs notifications@github.com wrote:
@anthonycorbacho https://github.com/anthonycorbacho Could you please review and merge this PR?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thekrakken/java-grok/pull/106#issuecomment-426626570, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_n5fY1fMKMTGzS9SleGjGuRRFsQCrZks5uhLNxgaJpZM4W7D-6 .
Sure. Thanks.
Reviewed and merged, thanks for your contribution 💃
@anthonycorbacho Thanks
Dear java-grok maintainers,
Please accept this PR.
Analysis Currently, capture is returning the unordered Map.
Resolution Return the map with the same order as log format(pattern).
Test Tested with different types of logs.