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

When enabling debug, schema validation produces too much output #40

Open
jfdenise opened this issue May 17, 2022 · 5 comments
Open

When enabling debug, schema validation produces too much output #40

jfdenise opened this issue May 17, 2022 · 5 comments

Comments

@jfdenise
Copy link
Collaborator

Context: Maven plugin
Enable debug with "-X" argument: mvn clean package -X
The console displays thousands of lines (channel content).
That is caused by :https://github.com/wildfly-extras/wildfly-channel/blob/main/core/src/main/java/org/wildfly/channel/ChannelMapper.java#L76
That calls: https://github.com/wildfly-extras/wildfly-channel/blob/main/core/src/main/java/org/wildfly/channel/ChannelMapper.java#L115

This makes debug output unusable.

@jmesnil
Copy link
Member

jmesnil commented May 17, 2022

Why is it unusable?

This is caused by the logger com.networknt.schema.RequiredValidator.
I'm not sure which actions you would like to make. mvn -X will output all debug logs including this one.
Unreadable? For sure! Unusable? Nothing that a grep can not filter out.

@jfdenise
Copy link
Collaborator Author

Yes, we could use grep but the amount of redundant output is so huge that it should be trimmed.

@jfdenise jfdenise changed the title When enabling debug, schame validation produces too much output When enabling debug, schema validation produces too much output May 17, 2022
@jmesnil
Copy link
Member

jmesnil commented May 25, 2022

I'm not sure there is much we can do in this project.

We could provide a patch to the project logging com.networknt.schema.RequiredValidator to use TRACE instead of DEBUG...

@jmesnil
Copy link
Member

jmesnil commented Feb 27, 2023

The log output can be reduced by adding the sys prop:

-Dorg.slf4j.simpleLogger.log.com.networknt.schema=off

when maven is executed: mvn clean package -Dorg.slf4j.simpleLogger.log.com.networknt.schema=off -X

However, I'm not sure if there is a way to generalise this other than editing the logger configuration used by Maven at ${MAVEN_HOME}/conf/logging/simplelogger.properties to append:

org.slf4j.simpleLogger.log.com.networknt.schema=off

@jfdenise
Copy link
Collaborator Author

@jmesnil , should we document the option and keep this behavior?

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

No branches or pull requests

2 participants