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

Connector tests are not logging properly #12

Closed
ozangunalp opened this issue Dec 20, 2023 · 2 comments · Fixed by #14
Closed

Connector tests are not logging properly #12

ozangunalp opened this issue Dec 20, 2023 · 2 comments · Fixed by #14
Assignees

Comments

@ozangunalp
Copy link
Collaborator

The pubsub-plus-connector module pulls quarkus through quarkus-smallrye-reactive-messaging extension dependency and also weld-core-impl for tests, which come with different logging backends.

Connector tests need to be configured with a single logging backend to not miss logs from different libraries

@ozangunalp
Copy link
Collaborator Author

ozangunalp commented Dec 21, 2023

@SravanThotakura05 If we exclude jboss-logmanager dependencies from tests, all logs will be captured by the log4j backend. Therefore the log4j.properties file will be effective to adjust log levels during tests.

Here is the snippet to add to the pubsub-plus-connector/pom.xml file

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <java.util.logging.manager>java.util.logging.LogManager</java.util.logging.manager>
                    </systemPropertyVariables>
                    <classpathDependencyExcludes>
                        <classpathDependencyExclude>org.jboss.slf4j:slf4j-jboss-logmanager</classpathDependencyExclude>
                        <classpathDependencyExclude>org.jboss.logmanager:jboss-logmanager-embedded</classpathDependencyExclude>
                    </classpathDependencyExcludes>
                </configuration>
            </plugin>

@ozangunalp
Copy link
Collaborator Author

I've also noticed usages of apache commons logging in IncomingMessagesUnsignedCounterBarrier and OutgoingMessagesUnsignedCounterBarrier. We also need to change those to using SolaceLogging utility.

@SravanThotakura05 SravanThotakura05 self-assigned this Jan 1, 2024
SravanThotakura05 added a commit that referenced this issue Jan 1, 2024
@SravanThotakura05 SravanThotakura05 mentioned this issue Jan 1, 2024
@SravanThotakura05 SravanThotakura05 linked a pull request Jan 4, 2024 that will close this issue
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 a pull request may close this issue.

2 participants