Skip to content

Support GLib structured logging for all domains

Marco Trevisan requested to merge 3v1n0/gnome-shell:better-logging into main

Make possible to log from JS at any GLib level providing all the metadata available to the logger, and support JS dumping for structured logs as well (other than old-style logging) for both the shell and the imported libraries.

All the current log() calls should then replaced to match the proper level in a further MR.

I was unsure weather to actually call the functions with something like logDomain(), but this would create a clash with gjs's logError() (that could be still be avoided by checking the arguments.length), and since Gjs suggests to use just normal domain names, I've followed the same.

Or maybe to somewhat reuse the console.* JS assumption, although structured logs are not just meant for console output.

Merge request reports