From d897ea7df4ce8b2aef4aa603f07dafa14e54f496 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 30 Jan 2019 15:35:28 +0100 Subject: Improve logging output * reduce log output when running without cgroup support * removed a superfluous newline in a deployment warning Change-Id: Ief9e92b8c4be26367136d663ab5ff29c82eddd35 Reviewed-by: Dominik Holland --- src/main-lib/main.cpp | 2 +- src/manager-lib/systemreader.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp index 49d12f3c..11a85d83 100644 --- a/src/main-lib/main.cpp +++ b/src/main-lib/main.cpp @@ -552,7 +552,7 @@ void Main::setupInstaller(const QString &appImageMountDir, const QStringList &ca #if !defined(AM_DISABLE_INSTALLER) if (!Package::checkCorrectLocale()) { // we should really throw here, but so many embedded systems are badly set up - qCWarning(LogDeployment) << "The appman installer needs a UTF-8 locale to work correctly:\n" + qCWarning(LogDeployment) << "The appman installer needs a UTF-8 locale to work correctly: " "even automatically switching to C.UTF-8 or en_US.UTF-8 failed."; } diff --git a/src/manager-lib/systemreader.cpp b/src/manager-lib/systemreader.cpp index 1cca4bde..cab1fa56 100644 --- a/src/manager-lib/systemreader.cpp +++ b/src/manager-lib/systemreader.cpp @@ -374,11 +374,8 @@ quint64 MemoryReader::readUsedValue() const QByteArray buffer = m_sysFs->readValue(); int i = buffer.indexOf("total_rss "); - if (i == -1) { - qCWarning(LogSystem) << "WARNING: Could not read memory.stat or its contents are invalid"; + if (i == -1) return 0; - } - return ::strtoull(buffer.data() + i + sizeof("total_rss ")-1, nullptr, 10); } -- cgit v1.2.3