Skip to content

Conversation

tobiasstadler
Copy link
Contributor

JBoss Logmanager is used in e.g WildFly and Quarkus.

@cla-checker-service
Copy link

cla-checker-service bot commented May 27, 2020

💚 CLA has been signed

@ghost
Copy link

ghost commented May 27, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Started by user Felix Barnsteiner, Replayed #5]

  • Start Time: 2020-06-15T18:20:19.639+0000

  • Duration: 7 min 6 sec

Test stats 🧪

Test Results
Failed 0
Passed 97
Skipped 4
Total 101

@felixbarny
Copy link
Member

felixbarny commented May 28, 2020

@spinscale you worked on something similar in https://github.com/spinscale/quarkus-logging-ecs. The main difference seems to be that your repo contains the Quarkus build steps. Also the configuration model seems to be different.

Could the EcsFormatter of this PR be plugged into what you built?

@tobiasstadler Looks really good! Could you also add a README.md to document how to set up this logger?

@spinscale
Copy link
Contributor

nice work, I will just use this and simplify the extension with the next release

@tobiasstadler
Copy link
Contributor Author

Could anyone start a CI run, please?

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

class EcsFormatterTest {
Copy link
Member

Choose a reason for hiding this comment

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

Isn't most of this already tested by JBossLogManagerTest? The exact matching on the JSON structure in this test is a bit brittle. If, for example, a new field is added all tests will fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what is JBossLogManagerTest is testing. But you are most probably right that there is an overlap.

Basicly I did the same as for the JUL ECS Formatter. There is also a EcsFormatterTest and JBossLogManagerTest. Do yo think I should remove EcsFormatterTest?

Copy link
Member

Choose a reason for hiding this comment

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

If you feel there’s something important that’s not covered in JBossLogManagerTest it might make sense to add it to the abstract test. If you want to test stuff that’s really specific to JBoss log manager just leave those tests and remove the ones that duplicate. When in doubt, lean towards lowering complexity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed a couple of tests from EcsFormatterTest which I think are already covered by JBossLogManagerTest.

@felixbarny felixbarny merged commit 2802b73 into elastic:master Jun 16, 2020
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