Example #1
0
static gboolean
init_log (const char *muhome, const char *name, MuLogOptions opts)
{
	gboolean rv;
	char *logpath;

	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, opts);
	g_free (logpath);

	return rv;
}
Example #2
0
static gboolean
init_log (const char *muhome, const char *name,
	  gboolean log_stderr, gboolean quiet, gboolean debug)
{
	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);
	g_free (logpath);

	return rv;
}