Init log stuff before creating application instance, so messages from it don't get lost

master
Yevgen Muntyan 2008-08-28 22:52:59 -05:00
parent 2636b04305
commit 76d803fa5a
1 changed files with 8 additions and 8 deletions

View File

@ -369,6 +369,14 @@ main (int argc, char *argv[])
gdk_threads_init ();
gdk_threads_enter ();
if (medit_opts.log_file || medit_opts.log_window)
{
if (medit_opts.log_file)
moo_set_log_func_file (medit_opts.log_file);
else
moo_set_log_func_window (TRUE);
}
app = MOO_APP (g_object_new (medit_app_get_type (),
"run-input", run_input,
"use-session", medit_opts.use_session,
@ -382,14 +390,6 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
if (medit_opts.log_file || medit_opts.log_window)
{
if (medit_opts.log_file)
moo_set_log_func_file (medit_opts.log_file);
else
moo_set_log_func_window (TRUE);
}
if (medit_opts.project_mode)
#ifdef MOO_ENABLE_PROJECT
project_mode (medit_opts.project);