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

main: set TERM="goaway" #2390

Merged
merged 1 commit into from Sep 24, 2019
Merged

Conversation

selsta
Copy link
Collaborator

@selsta selsta commented Sep 15, 2019

Fixes #2388

Copy link
Collaborator

@xiphon xiphon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to replace with

diff --git a/src/daemon/DaemonManager.cpp b/src/daemon/DaemonManager.cpp
index 0d31153..3f0dd60 100644
--- a/src/daemon/DaemonManager.cpp
+++ b/src/daemon/DaemonManager.cpp
@@ -36,6 +36,7 @@
 #include <QtConcurrent/QtConcurrent>
 #include <QApplication>
 #include <QProcess>
+#include <QProcessEnvironment>
 #include <QTime>
 #include <QStorageInfo>
 #include <QVariantMap>
@@ -118,6 +119,13 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
     m_daemon = new QProcess();
     initialized = true;

+    {
+        // Turn off colors in monerod log output
+        QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+        env.insert("TERM", "goaway");
+        m_daemon->setProcessEnvironment(env);
+    }
+
     // Connect output slots
     connect (m_daemon, SIGNAL(readyReadStandardOutput()), this, SLOT(printOutput()));
     connect (m_daemon, SIGNAL(readyReadStandardError()), this, SLOT(printError()));

Copy link
Collaborator

@xiphon xiphon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to Qt bug the proposed solution won't work. The bug is fixed in Qt 5.10+.

Let's implement original @selsta's fix for now.

luigi1111 added a commit that referenced this pull request Sep 24, 2019
4f4e879 main: set TERM='goaway' (selsta)
@luigi1111 luigi1111 merged commit 4f4e879 into monero-project:master Sep 24, 2019
@selsta selsta deleted the daemon-console branch November 14, 2019 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange characters in Daemon log
3 participants