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

[suggestion] log message for FileNotFound exception not clear enough #1365

Closed
nonnenmacher opened this issue Jun 17, 2020 · 1 comment · Fixed by #1379
Closed

[suggestion] log message for FileNotFound exception not clear enough #1365

nonnenmacher opened this issue Jun 17, 2020 · 1 comment · Fixed by #1379
Assignees
Milestone

Comments

@nonnenmacher
Copy link

when loading xml-routes from a file: reference, the log message when raising FileNotFoundException in org.apache.camel.quarkus.core.CamelRoutesCollector#collectXmlRoutesFromDirectory
is not explicit enough.

It log

catch (FileNotFoundException e) {
                LOGGER.debug("No XML routes found in {}. Skipping XML routes detection.", part);

instead of more explicitely output that it didn't find the file (hence no routes were added)

so one will see something like

2020-06-17 15:28:28,588 INFO  [org.apa.cam.qua.cor.CamelRoutesCollector] (Quarkus Main Thread) Loading additional Camel XML routes from: file:src/main/resources/routes/camel-routes.xml
2020-06-17 15:28:28,589 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (Quarkus Main Thread) Apache Camel 3.3.0 (CamelContext: camel-xml-route) is starting
2020-06-17 15:28:28,591 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (Quarkus Main Thread) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2020-06-17 15:28:28,591 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (Quarkus Main Thread) *Total 0 routes, of which 0 are started*

And search for other reasons on the XML file itself instead of more simpler cause : didn't find the file: or class path: resource specified

NOTE : it would also be a nice to have an addendum about *absolute* path, in the `Example:file-split-log`, as when running it without attention on the indicated `application.properties`

is like

camel.context.name = camel-quarkus-xml
camel.main.xml-routes = file:src/main/resources/routes/camel-routes.xml
camel.file.route.folder = src/main/resources/file

Which lead to this specific misleading message.

@JiriOndrusek
Copy link
Contributor

Please, assign to me.

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.

3 participants