[cpp-sp] 03/03: Add a flush to file logger.

Scott Cantor cantor.2 at osu.edu
Tue Jun 24 17:23:52 UTC 2025


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=5398b5f751418327e0fe5b72487b0628ea9a34e7

commit 5398b5f751418327e0fe5b72487b0628ea9a34e7
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jun 24 13:23:45 2025 -0400

    Add a flush to file logger.
---
 shibsp/logging/impl/AbstractLoggingService.cpp | 3 ++-
 shibsp/logging/impl/FileLoggingService.cpp     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/shibsp/logging/impl/AbstractLoggingService.cpp b/shibsp/logging/impl/AbstractLoggingService.cpp
index 945a3b81..ef6feb05 100644
--- a/shibsp/logging/impl/AbstractLoggingService.cpp
+++ b/shibsp/logging/impl/AbstractLoggingService.cpp
@@ -85,7 +85,8 @@ bool AbstractLoggingService::init()
 
     try {
         m_defaultPriority = Priority::getPriorityValue(m_config.get(DEFAULT_LEVEL_PROP_PATH, "INFO"));
-    } catch (const invalid_argument&) {
+    }
+    catch (const invalid_argument&) {
         m_defaultPriority = Priority::PriorityLevel::SHIB_INFO;
     }
 
diff --git a/shibsp/logging/impl/FileLoggingService.cpp b/shibsp/logging/impl/FileLoggingService.cpp
index e8060cf8..e4f48970 100644
--- a/shibsp/logging/impl/FileLoggingService.cpp
+++ b/shibsp/logging/impl/FileLoggingService.cpp
@@ -89,4 +89,5 @@ void FileLoggingService::outputMessage(const Category& category, Priority::Value
         << endl;
     
     m_out << sink.str();
+    m_out.flush();
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list