* disable g_debug in functions that may be called for logging is initialized
This commit is contained in:
@ -94,7 +94,7 @@ static void
|
||||
log_handler (const gchar* log_domain, GLogLevelFlags log_level,
|
||||
const gchar* msg)
|
||||
{
|
||||
if (log_level == G_LOG_LEVEL_DEBUG && !MU_LOG->_debug)
|
||||
if ((log_level & G_LOG_LEVEL_DEBUG) && !(MU_LOG->_debug))
|
||||
return;
|
||||
|
||||
log_write (log_domain ? log_domain : "mu", log_level, msg);
|
||||
@ -255,7 +255,8 @@ log_write (const char* domain, GLogLevelFlags level,
|
||||
/* for serious errors, log them to stderr as well */
|
||||
if (level & G_LOG_LEVEL_ERROR ||
|
||||
level & G_LOG_LEVEL_CRITICAL ||
|
||||
level & G_LOG_LEVEL_WARNING) {
|
||||
level & G_LOG_LEVEL_WARNING ||
|
||||
level & G_LOG_LEVEL_DEBUG) {
|
||||
fputs ("mu: ", stderr);
|
||||
fputs (msg, stderr);
|
||||
fputs ("\n", stderr);
|
||||
|
||||
@ -105,8 +105,8 @@ mu_util_dir_expand (const char *path)
|
||||
|
||||
/* now resolve any symlinks, .. etc. */
|
||||
if (realpath (dir, resolved) == NULL) {
|
||||
g_debug ("%s: could not get realpath for '%s': %s",
|
||||
__FUNCTION__, dir, strerror(errno));
|
||||
/* g_debug ("%s: could not get realpath for '%s': %s", */
|
||||
/* __FUNCTION__, dir, strerror(errno)); */
|
||||
g_free (dir);
|
||||
return NULL;
|
||||
} else
|
||||
@ -189,12 +189,12 @@ mu_util_check_dir (const gchar* path, gboolean readable, gboolean writeable)
|
||||
mode = F_OK | (readable ? R_OK : 0) | (writeable ? W_OK : 0);
|
||||
|
||||
if (access (path, mode) != 0) {
|
||||
g_debug ("Cannot access %s: %s", path, strerror (errno));
|
||||
/* g_debug ("Cannot access %s: %s", path, strerror (errno)); */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (stat (path, &statbuf) != 0) {
|
||||
g_debug ("Cannot stat %s: %s", path, strerror (errno));
|
||||
/* g_debug ("Cannot stat %s: %s", path, strerror (errno)); */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user