Sync log level in gui and core - #8885
Conversation
049886c to
28655ec
Compare
|
I need to have a think about this, I'm not quite sure I understand why this is necessary and what problem it solves. |
|
Two problems
|
|
Using a special IPC log level to force the GUI to keep working at low verbosity is the wrong fix, because it turns human-oriented logs into a control channel and tightens coupling; #8889 is a UI problem that can be solved in the GUI with a clear warning or confirm step when choosing verbose levels, while the Core should stay decoupled and expose state via a proper event stream instead (for example messages over Qt local serverwith events like |
Yes I plan to remove this when we have working IPC. can just revert the commit even that is why its its own commit so we can remove it later easily
We already are using the log messages but they are printed at INFO meaning if you set the level higher (i.e Note or Fatal ) the gui stops working correctly. I have not changed how it works just that you cant filter the messages now in the gui while being able to filter with the same levels you can from the cli This blocks me removing the args until we have IPC this is what we need todo do. Proper IPC its blocked by our core apps not having a QEvent loop , that is blocked by having Args and making our own 'App' class removing the args lets me remove the whole run , runInnter stuff that gets us closer to one event loop not ours + Qts |
43b158d to
022d3e9
Compare
Got it, not sure if we have an issue already, but I raised this so we don't forget:
Makes sense. |
There was a problem hiding this comment.
Not sure why but I am seeing:
[2025-08-27T09:47:57] INFO: running command: /home/nick/Projects/deskflow/build/bin/deskflow-core server -f --debug INFO --name spock-tux --enable-crypto --prevent-sleep --log /home/nick/deskflow.log --address :24800 -c /home/nick/.config/Deskflow/deskflow-server.conf --tls-cert /home/nick/.config/Deskflow/tls/deskflow.pem
/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:248
[2025-08-27T09:47:57] DEBUG: core process state changed: starting -> started
/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:612
[2025-08-27T09:47:57] INFO: using ei screen for wayland
/home/nick/Projects/deskflow/src/lib/deskflow/ServerApp.cpp:483
[2025-08-27T09:47:57] DEBUG: core connection state changed: 3
/home/nick/Projects/deskflow/src/lib/gui/MainWindow.cpp:1059
[2025-08-27T09:47:57] NOTE: started server, waiting for clients
/home/nick/Projects/deskflow/src/lib/deskflow/ServerApp.cpp:443
deskflow-core: /home/nick/Projects/deskflow/src/lib/base/Log.cpp:295: void Log::output(LogLevel, const char*): Assertion `static
_cast<int>(priority) >= -1 && static_cast<int>(priority) < g_numPriority' failed.
Maybe a bug only in debug build?
0230273 to
dd20c82
Compare
|
Our Debug level is weird.. also you can see we still get some INFO lines in FATAL around start up / shutdown i suspect these messages are before the level is set in the new instance of the core. |
dd20c82 to
aec987f
Compare
I Just Fixed this i missed that assert. |
… new `IPC` Level so the gui can work with any filter level
…debug level affecting performance fixes: #8889
aec987f to
0efde0f
Compare
In order to get the core nicely working without using any switches. we need to first allow the GUI to work with any log level not just INFO +. This Pr Does this by doing two things
IPCLevelThe second point can be undone when we have better IPC Until the gui has to see these messages.
Testing but setting the gui to FATAL and trying various connections anf key checks etc.. there is some INFO printed at start but i think we don't apply the log level before these messages.? happens when the core is started up or restarted maybe worth looking into in another pr ?
@nbolton I may need you to double check i've not messed any messages we need or added any we don't.
Added a label that shows when you have set the log below INFO
Each levels tooltip:
Required messagesNon-fatal errorsGeneral warningsNotable eventsGeneral events [Default]Debug entriesMore debug outputVerbose debug output