Skip to content

Conversation

kleisauke
Copy link
Member

Use g_log_writer_default_set_debug_domains() since resetting G_MESSAGES_DEBUG at runtime has no effect for GLib >= 2.80.

Also, remove any checks for the old G_MESSAGES_DEBUG env variable and overwrite it directly instead. This means the --vips-info CLI flag and the VIPS_INFO=1 env variable now take precedence over G_MESSAGES_DEBUG.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3710.

Targets the 8.16 branch.

Use `g_log_writer_default_set_debug_domains()` since resetting
`G_MESSAGES_DEBUG` at runtime has no effect for GLib >= 2.80.

Also, remove any checks for the old `G_MESSAGES_DEBUG` env variable
and overwrite it directly instead. This means the `--vips-info` CLI
flag and the `VIPS_INFO=1` env variable now take precedence over
`G_MESSAGES_DEBUG`.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3710.
@kleisauke
Copy link
Member Author

FWIW, VIPS_INFO=1 continued to work with GLib >= 2.80 because vips_verbose() was called before any log messages were written. However, this was not the case for the --vips-info CLI flag.

@jcupitt jcupitt merged commit f6aa2bd into libvips:8.16 Nov 12, 2024
6 checks passed
@jcupitt
Copy link
Member

jcupitt commented Nov 12, 2024

I noticed it wasn't working, but I was too lazy to find out why :( Well done!

@kleisauke kleisauke deleted the 8.16-fix-vips-info-flag branch November 13, 2024 09:25
kleisauke added a commit to kleisauke/libvips that referenced this pull request Nov 17, 2024
jcupitt pushed a commit that referenced this pull request Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants