This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new dc32b43a80fb CAMEL-24855: the file consumer says at INFO when it 
creates the starting directory it consumes from
dc32b43a80fb is described below

commit dc32b43a80fb80810da199add3877bfa340d7c6f
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Sep 21 11:12:20 2026 +0200

    CAMEL-24855: the file consumer says at INFO when it creates the starting 
directory it consumes from
    
    ## Description
    
    A route that consumes from a directory the project does not have (`from: 
file://orders` with the files next to the route instead) starts, creates the 
empty directory and waits: no error, no output, and nothing in the log says 
why. In the round-2 benchmark (series l3) 7 of 9 silent attempts were this 
shape; for a person prototyping with `camel run` it is the hardest failure to 
read.
    
    The file consumer now logs at INFO when it creates the starting directory:
    
    ```
    Created starting directory: orders (it did not exist): waiting for files
    ```
    
    where before it said so only at debug. The line reaches every runtime and 
every log reader (`camel run`, the camel-jbang-mcp log tool). A validator 
warning was considered and left out: the validator has no warning level (every 
message fails validation and blocks the MCP write tool), and an inbox another 
process fills is a legitimate route. The runtime line is the evidence; if the 
silent failures persist in the next series, a warning level can follow.
    
    ## Tests
    
    The existing file consumer tests cover the auto-created directory; the 
change is one log statement on the success branch.
---
 .../src/main/java/org/apache/camel/component/file/FileConsumer.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java
 
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java
index 80131f51cae7..866dee84955c 100644
--- 
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java
+++ 
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileConsumer.java
@@ -458,6 +458,9 @@ public class FileConsumer extends GenericFileConsumer<File> 
implements ResumeAwa
         boolean created = operations.buildDirectory(file.getPath(), absolute);
         if (!created) {
             LOG.warn("Cannot auto create starting directory: {}", file);
+        } else {
+            // CAMEL-24855: INFO so the log says why the consumer is waiting 
on an empty directory
+            LOG.info("Auto-created starting directory: {}; waiting for files", 
file);
         }
     }
 

Reply via email to