From 5b0d056f589248a233701a91eab2ffcc8875cb1c Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 15 Sep 2012 17:59:21 +0300 Subject: [PATCH] * lib/mu-runtime: update for logging changes --- lib/mu-runtime.c | 15 +++++---------- lib/mu-runtime.h | 1 + 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/mu-runtime.c b/lib/mu-runtime.c index 18df1ccf..6a392c4f 100644 --- a/lib/mu-runtime.c +++ b/lib/mu-runtime.c @@ -1,6 +1,6 @@ /* -*- mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ** -** Copyright (C) 2010 Dirk-Jan C. Binnema +** Copyright (C) 2010-2012 Dirk-Jan C. Binnema ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -53,21 +53,17 @@ static const char* runtime_path (MuRuntimePath path); static gboolean -init_log (const char *muhome, const char *name, - gboolean log_stderr, gboolean quiet, gboolean debug) +init_log (const char *muhome, const char *name, MuLogOptions opts) { gboolean rv; char *logpath; - if (log_stderr) - return mu_log_init_with_fd (fileno(stderr), FALSE, - quiet, debug); - logpath = g_strdup_printf ("%s%c%s%c%s.log", muhome, G_DIR_SEPARATOR, MU_LOG_DIRNAME, G_DIR_SEPARATOR, name); - rv = mu_log_init (logpath, TRUE, quiet, debug); + + rv = mu_log_init (logpath, opts); g_free (logpath); return rv; @@ -75,7 +71,6 @@ init_log (const char *muhome, const char *name, - gboolean mu_runtime_init (const char* muhome_arg, const char *name) { @@ -104,7 +99,7 @@ mu_runtime_init (const char* muhome_arg, const char *name) init_paths (muhome, _data); _data->_name = g_strdup (name); - if (!init_log (muhome, name, FALSE, TRUE, FALSE)) { + if (!init_log (muhome, name, MU_LOG_OPTIONS_BACKUP)) { runtime_free (); g_free (muhome); return FALSE; diff --git a/lib/mu-runtime.h b/lib/mu-runtime.h index af52862f..1da1c17c 100644 --- a/lib/mu-runtime.h +++ b/lib/mu-runtime.h @@ -21,6 +21,7 @@ #define __MU_RUNTIME_H__ #include +#include G_BEGIN_DECLS