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

Excessive logs on startup #564

Open
cowwoc opened this issue Nov 19, 2023 · 1 comment
Open

Excessive logs on startup #564

cowwoc opened this issue Nov 19, 2023 · 1 comment

Comments

@cowwoc
Copy link

cowwoc commented Nov 19, 2023

Version 11.4.9

14:58:57.147 [main-5] INFO  org.docx4j.XmlUtils.<clinit>() - setProperty com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl (from docx4j.properties)
14:58:57.148 [main-5] WARN  org.docx4j.XmlUtils.<clinit>() - actual SAXParserFactory: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
14:58:57.150 [main-5] INFO  org.docx4j.XmlUtils.<clinit>() - setProperty com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl (from docx4j.properties)
14:58:57.152 [main-5] WARN  org.docx4j.XmlUtils.<clinit>() - actual DocumentBuilderFactory: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

I suggest using DEBUG level logging for this stuff. As far as I can tell, there is nothing to warn about here. Even INFO is a bit excessive given that the code is just confirming that the configuration is being applied. If I had configuration problems, I'd enable DEBUG.

@xulongZheng
Copy link

You can eliminate dependencies on built-in logging when introducing docx4j

<dependency> <groupId>org.docx4j</groupId> <artifactId>docx4j-ImportXHTML</artifactId> <version>8.3.10</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> </exclusion> </exclusions> </dependency>

This method can reduce the log output at startup, but when using docx4j, there will be many logs, you can change the docx4j log level to ERROR in your own log configuration file。

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