[Libreoffice-commits] core.git: desktop/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 23 11:10:08 UTC 2020
desktop/source/pkgchk/unopkg/unopkg_app.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 5fe5c3a3f485f925a327cdc7b95c8691f6078608
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jan 23 12:56:00 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Jan 23 12:09:35 2020 +0100
Logger should be initialized with local context
... otherwise its output will go to connected soffice, and will not
reach the unopkg console, e.g. trying to execute
unopkg add wrong_extension_name
while an instance of soffice is running.
Change-Id: Ic0b0c48f9b3e8be084e0fdd1838cb0614da6817e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87248
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 1f2429000152..eba9c283f9d5 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -303,13 +303,13 @@ extern "C" int unopkg_main()
// Initialize logging. This will log errors to the console and
// also to file if the --log-file parameter was provided.
- logger.reset(new comphelper::EventLogger(xComponentContext, "unopkg"));
+ logger.reset(new comphelper::EventLogger(xLocalComponentContext, "unopkg"));
const Reference<XLogger> xLogger(logger->getLogger());
xLogger->setLevel(LogLevel::WARNING);
- Reference<XLogFormatter> xLogFormatter(SimpleTextFormatter::create(xComponentContext));
+ Reference<XLogFormatter> xLogFormatter(SimpleTextFormatter::create(xLocalComponentContext));
Sequence < beans::NamedValue > aSeq { { "Formatter", Any(xLogFormatter) } };
- xConsoleHandler.set(ConsoleHandler::createWithSettings(xComponentContext, aSeq));
+ xConsoleHandler.set(ConsoleHandler::createWithSettings(xLocalComponentContext, aSeq));
xLogger->addLogHandler(xConsoleHandler);
xConsoleHandler->setLevel(LogLevel::WARNING);
xLogger->setLevel(LogLevel::WARNING);
@@ -318,7 +318,7 @@ extern "C" int unopkg_main()
if (!logFile.isEmpty())
{
Sequence < beans::NamedValue > aSeq2 { { "Formatter", Any(xLogFormatter) }, {"FileURL", Any(logFile)} };
- xFileHandler.set(css::logging::FileHandler::createWithSettings(xComponentContext, aSeq2));
+ xFileHandler.set(css::logging::FileHandler::createWithSettings(xLocalComponentContext, aSeq2));
xFileHandler->setLevel(LogLevel::WARNING);
xLogger->addLogHandler(xFileHandler);
}
More information about the Libreoffice-commits
mailing list