[Libreoffice-commits] online.git: common/Log.hpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 19 08:06:29 UTC 2018
common/Log.hpp | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit e167cd173bd38b2e15285801a3af96ba9acbc001
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Nov 19 09:05:57 2018 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Nov 19 09:06:10 2018 +0100
StreamLogger: make members private
Change-Id: Ie9ec09a9b7b8885bd97e62bd65df27cf1454c408
diff --git a/common/Log.hpp b/common/Log.hpp
index 755f90750..bf05fc7ce 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -110,9 +110,11 @@ namespace Log
}
}
- std::ostringstream _stream;
+ std::ostringstream& getStream() { return _stream; }
private:
+ std::ostringstream _stream;
+
std::function<void(const std::string&)> _func;
const bool _enabled;
};
@@ -164,7 +166,7 @@ namespace Log
{
if (lhs.enabled())
{
- lhs._stream << rhs;
+ lhs.getStream() << rhs;
}
return lhs;
@@ -175,7 +177,7 @@ namespace Log
{
if (lhs.enabled())
{
- lhs._stream << rhs;
+ lhs.getStream() << rhs;
}
return lhs;
@@ -185,7 +187,7 @@ namespace Log
{
if (lhs.enabled())
{
- lhs._stream << Poco::DateTimeFormatter::format(Poco::DateTime(rhs),
+ lhs.getStream() << Poco::DateTimeFormatter::format(Poco::DateTime(rhs),
Poco::DateTimeFormat::ISO8601_FRAC_FORMAT);
}
@@ -215,7 +217,7 @@ namespace Log
{
if (lhs.enabled())
{
- lhs._stream << Log::to_string(rhs);
+ lhs.getStream() << Log::to_string(rhs);
}
return lhs;
More information about the Libreoffice-commits
mailing list