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 0c5ffd5c Using BasicConfigurator should prevent default configuration 
(#450)
0c5ffd5c is described below

commit 0c5ffd5c9ccafe91adc308230863708bd5e5aa7b
Author: Stephen Webb <[email protected]>
AuthorDate: Fri Jan 17 11:35:41 2025 +1100

    Using BasicConfigurator should prevent default configuration (#450)
---
 src/main/cpp/basicconfigurator.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/cpp/basicconfigurator.cpp 
b/src/main/cpp/basicconfigurator.cpp
index c8da559d..7839f308 100644
--- a/src/main/cpp/basicconfigurator.cpp
+++ b/src/main/cpp/basicconfigurator.cpp
@@ -30,7 +30,7 @@ void BasicConfigurator::configure(const LayoutPtr& layoutArg)
        auto layout = layoutArg;
        if (!layout)
        {
-               static const helpers::WideLife<LogString> 
TTCC_CONVERSION_PATTERN(LOG4CXX_STR("%r [%t] %p %c %x - %m%n"));
+               LogString TTCC_CONVERSION_PATTERN{LOG4CXX_STR("%r [%t] %p %c %x 
- %m%n")};
                layout = 
std::make_shared<PatternLayout>(TTCC_CONVERSION_PATTERN);
        }
        auto appender = std::make_shared<ConsoleAppender>(layout);
@@ -39,6 +39,7 @@ void BasicConfigurator::configure(const LayoutPtr& layoutArg)
 
 void BasicConfigurator::configure(const AppenderPtr& appender)
 {
+       LogManager::getLoggerRepository()->setConfigured(true);
        LoggerPtr root = Logger::getRootLogger();
        root->addAppender(appender);
 }

Reply via email to