From 35dacc36716bdac66bc2673a6725083dc265d310 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 23 May 2013 11:50:57 +0100 Subject: move the logging initialisation out to be call by frontends This allows each frontend to pass a distinct callback to configure the output file stream appropriately for their use. --- atari/gui.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'atari/gui.c') diff --git a/atari/gui.c b/atari/gui.c index f125142af..776e30a25 100644 --- a/atari/gui.c +++ b/atari/gui.c @@ -1037,6 +1037,7 @@ int main(int argc, char** argv) nsurl *url; nserror error; + /* @todo logging file descriptor update belongs in a nslog_init callback */ setbuf(stderr, NULL); setbuf(stdout, NULL); #ifdef WITH_DBG_LOGFILE @@ -1053,6 +1054,11 @@ int main(int argc, char** argv) atari_find_resource((char*)&messages, "messages", "res/messages"); atari_find_resource((char*)&options, "Choices", "Choices"); + /* initialise logging - not fatal if it fails but not much we can + * do about it + */ + nslog_init(NULL, &argc, argv); + LOG(("Initialising core...")); netsurf_init(&argc, &argv, options, messages); -- cgit v1.2.3