Only create one global logger instance.

This commit is contained in:
irungentoo 2015-02-07 16:53:50 -05:00
parent 55b4484305
commit 278406393c
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -1012,8 +1012,8 @@ uint32_t tox_do_interval(Tox *tox)
*/
Tox *tox_new(Tox_Options *options)
{
logger_set_global(logger_new(LOGGER_OUTPUT_FILE, LOGGER_LEVEL, "toxcore"));
if (!logger_get_global())
logger_set_global(logger_new(LOGGER_OUTPUT_FILE, LOGGER_LEVEL, "toxcore"));
Messenger_Options m_options = {0};