Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
2.0
-
None
Description
As an occasional developer of Qbs modules, I often struggle to make my module work. It's not even clear whether it runs any code at all. This forces me to add logs everywhere: I put logging in the Rule.prepare script, I initialize Rule.inputs with a block of code instead a simple list literal, etc. And yet, it is not enough.
I also try to use Qbs in verbose mode, but its output is very messy and barely readable by non-Qbs developer.
There are log messages with a certain log category like
qbs.exec: finishNode adds leaf ARTIFACT /Users/gooroo/Work/Projects/Personal/playdate-first/default/the-second.5bfb0f3e/libthe-second.dylib.dSYM [the-second] Buildable qbs.exec: finishNode adds leaf ARTIFACT /Users/gooroo/Work/Projects/Personal/playdate-first/default/the-second.5bfb0f3e/libthe-second.dylib.dSYM/Contents/Info.plist [the-second] Buildable qbs.exec: RULE [bundle.input,codesign.signed_artifact,debuginfo_bundle,debuginfo_dll,debuginfo_plist,dynamiclibrary,dynamiclibrary_import,dynamiclibrary_symbols,dynamiclibrary_symlink][dynamiclibrary_import,dynamiclibrary_symbols,linkerscript,obj,res,staticlibrary,versionscript] [the-second] located at /opt/homebrew/Cellar/qbs/2.3.1/share/qbs/modules/cpp/GenericGCC.qbs:469:18 qbs.exec: node already built. Skipping.
There are other messages without any log category (these are the messages that are logged in normal mode too):
linking libthe-second.dylib [the-second]
generating dSYM for the-second [the-second]
There are some messages with no log category, but formatted differently (they seem to be messages from JS code, both from modules provides by Qbs and from modules written by a user):
DEBUG: [require] importing file /opt/homebrew/Cellar/qbs/2.3.1/share/qbs/imports/qbs/PathTools/path-tools.js DEBUG: [require] loading extension qbs.Process DEBUG: [require] loading extension qbs.TextFile DEBUG: [require] loading extension qbs.UnixUtils DEBUG: [require] importing file /opt/homebrew/Cellar/qbs/2.3.1/share/qbs/imports/qbs/UnixUtils/unix-utils.js DEBUG: [require] loading extension qbs.Utilities DEBUG: [require] loading extension qbs.WindowsUtils DEBUG: [require] importing file /opt/homebrew/Cellar/qbs/2.3.1/share/qbs/imports/qbs/WindowsUtils/windows-utils.js DEBUG: Symbol file '/Users/gooroo/Work/Projects/Personal/playdate-first/default/the-second.5bfb0f3e/.sosymbols/libthe-second.dylib' does not yet exist.
There are some multiline messages:
qbs.buildgraph: consider rule node [playdate.native-interim][dynamiclibrary] changed: [] compatible: [/Users/gooroo/Work/Projects/Personal/playdate-first/default/the-second.5bfb0f3e/libthe-second.dylib] added: [/Users/gooroo/Work/Projects/Personal/playdate-first/default/the-second.5bfb0f3e/libthe-second.dylib] removed: []
And all these kinds of messages are mixed up. This makes it very difficult to read and to parse.
What [I think] I need:
- Some intermediate log level that would contain only information useful for me as a developer of modules for Qbs (and not a developer of Qbs itself).
- Some eaiser to comprehend way to see what is going on: what files are tagged with which tags, which rules are run and why, how the artifacts and rules are connected, etc.
- Some easy way to filter logs by categories? (without the need to touch QT_LOGGING_RULES or something)
- It also would be great to have an option to output logs in JSONL format.