installGLibLogWriterForReleaseBuilds

fun Log.installGLibLogWriterForReleaseBuilds(minPriority: LogLevel = defaultReleaseLogLevel)

Installs this writer for release builds if the application is not debuggable.

Debug logs can still be enabled on release builds using the standard GLib g_log mechanism:

export G_MESSAGES_DEBUG=all

Or restrict them to a specific domain:

export G_MESSAGES_DEBUG=my_app

To prevent this behavior, explicitly set minPriority.

Parameters

minPriority

The minimum log level to log. Default is LogLevel.MESSAGE in release builds, or LogPriority.DEBUG if GLib debug mode is enabled.