-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a way to display log in a ScriptDialog #26
Comments
How exactly would this solve our issue? We already have a Log panel. The issue is that the Log panel isn't updated while JS code runs, as that is single-threaded, right? |
The logs are displayed when running a script in the GUI, and visible from the Log panel (we should probably remove them from the history though... another task). The problem this task is trying to fix is when using knut via the command line: you don't see any logs. For example, when doing the rc to ui conversion, there are some warnings displayed when a flag is not handled, but I'm missing them. So the idea is to have a way to add a |
Ah, okay. That's clearer. Shouldn't the command line output just print everything that we dump out with spdlog? Or do you mean if you don't have a terminal open at all but still run it in script mode? |
Unfortunately, it doesn't work on Windows, we can't see the command line output... (limitation of Windows, a GUI program does not display anything when run from the CLI). |
Okay, then that clarifies it 👍 |
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. Just add a QPlainTextEdit (e.g. foo) and set `data.fooDisplayLogs = "level"` to see all logs of level greater than or equal to "level" Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. Just add a QPlainTextEdit (e.g. foo) and set `data.fooDisplayLogs = "level"` to see all logs of level greater than or equal to "level" Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. Just add a QPlainTextEdit (e.g. foo) and set `data.fooDisplayLogs = "level"` to see all logs of level greater than or equal to "level" Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. Just add a QPlainTextEdit (e.g. foo) and set `data.fooDisplayLogs = "level"` to see all logs of level greater than or equal to "level" Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. Just add a QPlainTextEdit (e.g. foo) and set `data.fooDisplayLogs = "level"` to see all logs of level greater than or equal to "level" Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. The QPlainTextEdit can be made visible using the qml setDisplayLogs method and taking as parameter the minimum log level that we want to have. Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. The QPlainTextEdit can be made visible using the qml setDisplayLogs method and taking as parameter the minimum log level that we want to have. Fixes KDAB#26
Added a QPlainTextEdit widget to allow real-time log display in the user interface. The actual code did not allow windows users to view logs when launching knut from the command line. The QPlainTextEdit can be made visible using the qml setDisplayLogs method and taking as parameter the minimum log level that we want to have. Fixes KDAB#26
Currently, scripts report their output through logging.
However, the log output doesn't render whilst the script is running.
This could be a good first step to indicate how far along a script is and to show the user that it's indeed doing something.
We could imagine adding a
QPlainTextEdit
with a particular nameLogOutput
or something like that. In theScriptDialogItem
, if we find suchQPlainTextEdit
, we initalize it in readonly log mode, and redirect the logging output to it.Hint: there's a small syntaxhilighting in GUI that could be used, see
LogHighlighter
The text was updated successfully, but these errors were encountered: