Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsolicited debug messages on stderr/syslog #7453

Closed
jnweiger opened this issue Sep 5, 2019 · 6 comments
Closed

unsolicited debug messages on stderr/syslog #7453

jnweiger opened this issue Sep 5, 2019 · 6 comments
Assignees
Labels
p2-high Escalation, on top of current planning, release blocker
Milestone

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Sep 5, 2019

tested with 2.6.0rc1 on Debian10

owncloud

  • debug messages appear on stderr

owncloud --logfile -

  • debug messages appear on stdout

owncloud --logfile /dev/null

  • silent.

This is only seen on debian 10. E.g. ubuntu 18.04 is silent per default.

@ogoffart
Copy link
Contributor

what debug messages?

I guess it is either things that are not part of owncloud, or maybe they appear before we install the hook.

@jnweiger
Copy link
Contributor Author

jnweiger commented Dec 6, 2019

Basically everything. A full log output appears either on stderr, or when started with gnome launcher on syslog -- for details see
https://central.owncloud.org/t/client-on-ubuntu-18-04-spams-syslog/23158/5

@jnweiger jnweiger changed the title unsolicited debug messages on stderr unsolicited debug messages on stderr/syslog Dec 6, 2019
@jnweiger
Copy link
Contributor Author

jnweiger commented Dec 6, 2019

My first guess: We hit the else branch way too often in this code snippet:

diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp
index 4b4791bd7..752fa0fd1 100644
--- a/src/libsync/logger.cpp
+++ b/src/libsync/logger.cpp
@@ -40,7 +40,7 @@ static void mirallLogCatcher(QtMsgType type, const QMessageLogContext &ctx, cons
     if (!logger->isNoop()) {
         logger->doLog(qFormatLogMessage(type, ctx, message));
     } else if(type >= QtCriticalMsg) {
-        std::cerr << qPrintable(qFormatLogMessage(type, ctx, message)) << std::endl;
+        std::cerr << qPrintable(qFormatLogMessage(type, ctx, message)) << std::endl << std::endl << std::endl;
     }
 
 #if defined(Q_OS_WIN)

The extra newlines added here are for verifying only: they are visible on stderr now.

@michaelstingl michaelstingl added the p2-high Escalation, on top of current planning, release blocker label Dec 7, 2019
@michaelstingl
Copy link
Contributor

Linux only?

@michaelstingl michaelstingl added this to the 2.6.2 milestone Dec 7, 2019
@TheOneRing
Copy link
Contributor

I'm sorry I assumed the Qt*Msg enum to be ordered but it isn't...

TheOneRing added a commit to TheOneRing/client that referenced this issue Dec 9, 2019
This fixes the flodded sys log.

Fixes: owncloud#7453
TheOneRing added a commit that referenced this issue Dec 9, 2019
This fixes the flodded sys log.

Fixes: #7453
@michaelstingl
Copy link
Contributor

Fixed in next 2.6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

No branches or pull requests

4 participants