[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd' - common/Log.cpp
Pranav Kant
pranavk at collabora.co.uk
Thu Jul 13 10:39:11 UTC 2017
common/Log.cpp | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 98db79f562f04333e16422c88964d248f7b14395
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed Jul 12 15:08:59 2017 +0530
Open the log channel explicitly to avoid file creation inside jail
Change-Id: Ida66861e0e1c5925dbbf53d564a829eaf0fd15c7
(cherry picked from commit af13e5927d216dd53e672056d64f11766d001457)
Reviewed-on: https://gerrit.libreoffice.org/39856
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit c36136b0cf264d4f8bdd7736a939dc69a33bf0c9)
Reviewed-on: https://gerrit.libreoffice.org/39896
diff --git a/common/Log.cpp b/common/Log.cpp
index e4a9e995..0b19d88f 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -158,6 +158,12 @@ namespace Log
else
channel = static_cast<Poco::Channel*>(new Poco::ConsoleChannel());
+ /**
+ * Open the channel explicitly, instead of waiting for first log message
+ * This is important especially for the kit process where opening the channel
+ * after chroot can cause file creation inside the jail instead of outside
+ * */
+ channel->open();
auto& logger = Poco::Logger::create(Source.name, channel, Poco::Message::PRIO_TRACE);
logger.setLevel(logLevel.empty() ? std::string("trace") : logLevel);
More information about the Libreoffice-commits
mailing list