Updated Branches: refs/heads/camel-2.10.x 412862992 -> 4eb12158d
CAMEL-6551 RemoteFileConsumer just writing the warning message at the first time. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4eb12158 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4eb12158 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4eb12158 Branch: refs/heads/camel-2.10.x Commit: 4eb12158dd43cead3372b10a712102692c080189 Parents: 4128629 Author: Willem Jiang <ningji...@apache.org> Authored: Tue Jul 16 10:35:24 2013 +0800 Committer: Willem Jiang <ningji...@apache.org> Committed: Tue Jul 16 10:57:20 2013 +0800 ---------------------------------------------------------------------- .../camel/component/file/remote/RemoteFileConsumer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/4eb12158/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java ---------------------------------------------------------------------- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java index 4f40b84..230d889 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java @@ -28,6 +28,7 @@ import org.apache.camel.component.file.GenericFileOperationFailedException; */ public abstract class RemoteFileConsumer<T> extends GenericFileConsumer<T> { protected boolean loggedIn; + protected boolean loggedInWarning; public RemoteFileConsumer(RemoteFileEndpoint<T> endpoint, Processor processor, RemoteFileOperations<T> operations) { super(endpoint, processor, operations); @@ -66,10 +67,16 @@ public abstract class RemoteFileConsumer<T> extends GenericFileConsumer<T> { if (!loggedIn) { String message = "Cannot connect/login to: " + remoteServer() + ". Will skip this poll."; - log.warn(message); + if (!loggedInWarning) { + log.warn(message); + loggedInWarning = true; + } return false; + } else { + // need to log the failed login again + loggedInWarning = false; } - + return true; }