Git commit 4d6970694a77b49983d0c7ce98717a6e7f21b0bd by Jasem Mutlaq.
Committed on 30/09/2017 at 23:14.
Pushed by mutlaqja into branch 'master'.
Simplyfing logs support. Adding colors to error and warning messages. Still=
lots of work required
M +1 -0 kstars/CMakeLists.txt
A +428 -0 kstars/ekos/auxiliary/opslogs.ui
M +14 -1 kstars/ekos/ekosmanager.ui
M +12 -1 kstars/indi/indidevice.cpp
https://commits.kde.org/kstars/4d6970694a77b49983d0c7ce98717a6e7f21b0bd
diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index 81daab106..3454ef3e5 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -167,6 +167,7 @@ if (INDI_FOUND)
#ekos/guide/rcalibration.ui
# Auxiliary
ekos/auxiliary/filtersettings.ui
+ ekos/auxiliary/opslogs.ui
)
=
set(ekos_SRCS
diff --git a/kstars/ekos/auxiliary/opslogs.ui b/kstars/ekos/auxiliary/opslo=
gs.ui
new file mode 100644
index 000000000..ef22225ff
--- /dev/null
+++ b/kstars/ekos/auxiliary/opslogs.ui
@@ -0,0 +1,428 @@
+
+
+ OpsAdvanced
+
+
+
+ 0
+ 0
+ 465
+ 261
+
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+ -
+
+
-
+
+
+
+ 48
+ 48
+
+
+
+
+ 48
+ 48
+
+
+
+
+
+
+ :/icons/AlignWarning.sv=
g
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p>Enable Logs =
to diagnose issues with Ekos and INDI. Only enable the necessary logs to he=
lp in diagnosing specific problems. Logs consume resources and may slow the=
system down. Turn off logs when no longer used.</p></body><=
/html>
+
+
+ true
+
+
+
+
+
+ -
+
+
+ Logs
+
+
+
-
+
+
+ Log Ekos Focus module activity
+
+
+ Focus
+
+
+
+ -
+
+
+ Log Ekos Mount module activity
+
+
+ Mount
+
+
+
+ -
+
+
+ Log debug messages to default output device used by the p=
latform (e.g. Standard Error)
+
+
+ Defaul&t
+
+
+ true
+
+
+
+ -
+
+
+ Enable regular debug output
+
+
+ Reg&ular
+
+
+ true
+
+
+ verbosityButtonGroup
+
+
+
+ -
+
+
+ Log Ekos Alignment module activity
+
+
+ Alignment
+
+
+
+ -
+
+
+ Log Ekos Guide module activity
+
+
+ Guide
+
+
+
+ -
+
+
+ Log FITS processing activity
+
+
+ Mount
+
+
+
+ -
+
+
+ Log Ekos Capture module activity
+
+
+ Focuser
+
+
+
+ -
+
+
+ Log INDI devices activity
+
+
+ CCD
+
+
+
+ -
+
+
+ Have problems with INDI drivers? Turn on logging for driv=
ers that exhibit issues.
+
+
+ Drivers
+
+
+
+ -
+
+
+ Enable verbose debug output
+
+
+ &Verbose
+
+
+ verbosityButtonGroup
+
+
+
+ -
+
+
+ Log output to log file
+
+
+ File
+
+
+
+ -
+
+
+ Log Ekos Capture module activity
+
+
+ Capture
+
+
+
+ -
+
+
+ Have problem with Ekos? Turn on logging for Ekos modules =
that exhibit issues.
+
+
+ Ekos
+
+
+
+ -
+
+
+ Disable all logging output
+
+
+ &Disable
+
+
+ false
+
+
+ verbosityButtonGroup
+
+
+
+ -
+
+
+ Log Ekos Focus module activity
+
+
+ Filter Wheel
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ Log FITS processing activity
+
+
+ FITS
+
+
+
+ -
+
+
+ Log INDI devices activity
+
+
+ INDI
+
+
+
+ -
+
+
+ Log Ekos Scheduler module activity
+
+
+ Scheduler
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ Log Ekos Scheduler module activity
+
+
+ Auxiliary
+
+
+
+ -
+
+
+ Log Ekos Mount module activity
+
+
+ Weather
+
+
+
+ -
+
+
+ Log Ekos Guide module activity
+
+
+ Astrometry
+
+
+
+ -
+
+
+ Log Ekos Alignment module activity
+
+
+ Dome
+
+
+
+ -
+
+
+ Output:
+
+
+
+ -
+
+
+ Verbosity:
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Display INDI status messages in the status bar
+
+
+ Display incoming INDI status messages in KStars status bar=
+
+
+ Display incoming INDI status messages in KStars status bar=
+
+
+ INDI messages in status &bar
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Enable All Logs
+
+
+
+ -
+
+
+ Disable All Logs
+
+
+
+ -
+
+
+ font-weight:bold;
+
+
+ Show Logs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
diff --git a/kstars/ekos/ekosmanager.ui b/kstars/ekos/ekosmanager.ui
index 13176a155..4300f8d51 100644
--- a/kstars/ekos/ekosmanager.ui
+++ b/kstars/ekos/ekosmanager.ui
@@ -304,6 +304,19 @@
+ -
+
+
+
+ 32
+ 32
+
+
+
+ Logs
+
+
+
-
@@ -1411,7 +1424,7 @@
-
+
-
diff --git a/kstars/indi/indidevice.cpp b/kstars/indi/indidevice.cpp
index 8da992706..89b25d76b 100644
--- a/kstars/indi/indidevice.cpp
+++ b/kstars/indi/indidevice.cpp
@@ -266,8 +266,19 @@ void INDI_D::updateMessageLog(INDI::BaseDevice *idv, i=
nt messageID)
return;
=
QString message =3D QString::fromStdString(dv->messageQueue(messageID)=
);
+ // TODO the colors should be from the color scheme
+ if (message.mid(21,2) =3D=3D "[E")
+ message =3D QString("%1").arg(message);
+ else if (message.mid(21,2) =3D=3D "[W")
+ message =3D QString("%1").arg(messag=
e);
+ else if (message.mid(21,2) !=3D "[I")
+ {
+ // Debug message
+ qCDebug(KSTARS_INDI) << idv->getDeviceName() << ": " << message.mi=
d(21);
+ return;
+ }
msgST_w->ensureCursorVisible();
- msgST_w->insertPlainText(i18nc("Message shown in INDI control panel", =
"%1", message));
+ msgST_w->insertHtml(i18nc("Message shown in INDI control panel", "%1",=
message));
msgST_w->insertPlainText("\n");
QTextCursor c =3D msgST_w->textCursor();
c.movePosition(QTextCursor::Start);