This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/master by this push:
new da0313eb Support changes to the buffering properties of an active file
appender (#463)
da0313eb is described below
commit da0313eb333e4f76ed7ade48075025f64f9c29e9
Author: Stephen Webb <[email protected]>
AuthorDate: Mon Jan 27 15:41:44 2025 +1100
Support changes to the buffering properties of an active file appender
(#463)
---
src/main/cpp/fileappender.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/main/cpp/fileappender.cpp b/src/main/cpp/fileappender.cpp
index d8a55aca..0ecd3d03 100644
--- a/src/main/cpp/fileappender.cpp
+++ b/src/main/cpp/fileappender.cpp
@@ -192,6 +192,8 @@ void FileAppender::activateOptionsInternal(Pool& p)
if (errors == 0)
{
WriterAppender::activateOptions(p);
+ if (auto p = _priv->taskManager.lock())
+ p->value().removePeriodicTask(getName());
if (!_priv->bufferedIO)
;
@@ -204,11 +206,6 @@ void FileAppender::activateOptionsInternal(Pool& p)
);
_priv->taskManager = taskManager;
}
- else if (0 == _priv->bufferedSeconds)
- {
- if (auto p = _priv->taskManager.lock())
- p->value().removePeriodicTask(getName());
- }
}
}