Created
March 31, 2015 13:43
-
-
Save ikonst/8f94b537731d8a1744cb to your computer and use it in GitHub Desktop.
Connecting GLib g_log to NSLog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void my_log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) | |
{ | |
NSLog(@"%@", [NSString stringWithUTF8String:message]); | |
} | |
... | |
g_log_set_default_handler( my_log_handler, NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment