+ pcontext_t context = get_pcontext();
+
+ /* scriptutil context doesn't do any logging except for critical
+ * and error levels */
+ if (context != CONTEXT_SCRIPTUTIL) {
+ /* convert the highest level to a string and dbprintf it */
+ if (log_level & G_LOG_LEVEL_ERROR)
+ maxlevel = _("error (fatal): ");
+ else if (log_level & G_LOG_LEVEL_CRITICAL)
+ maxlevel = _("critical (fatal): ");
+ else if (log_level & G_LOG_LEVEL_WARNING)
+ maxlevel = _("warning: ");
+ else if (log_level & G_LOG_LEVEL_MESSAGE)
+ maxlevel = _("message: ");
+ else if (log_level & G_LOG_LEVEL_INFO)
+ maxlevel = _("info: ");
+ else
+ maxlevel = ""; /* no level displayed for debugging */