Commit a749fdae21a6228fe1d07f43da7b72fa8a46342f
1 parent
8cd4278b
Exists in
master
and in
4 other branches
Redirecting gtk logs to lib3270.
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
src/main/main.c
... | ... | @@ -70,6 +70,10 @@ static gboolean quit_signal(GtkApplication *app) { |
70 | 70 | } |
71 | 71 | #endif // G_OS_UNIX |
72 | 72 | |
73 | +static void g_log_to_lib3270(const gchar *log_domain,GLogLevelFlags G_GNUC_UNUSED(log_level),const gchar *message,gpointer G_GNUC_UNUSED(user_data)) { | |
74 | + lib3270_write_log(NULL,log_domain,"%s",message); | |
75 | +} | |
76 | + | |
73 | 77 | int main (int argc, char **argv) { |
74 | 78 | |
75 | 79 | GtkApplication *app; |
... | ... | @@ -91,6 +95,8 @@ int main (int argc, char **argv) { |
91 | 95 | } |
92 | 96 | #endif // _WIN32 |
93 | 97 | |
98 | + g_log_set_default_handler(g_log_to_lib3270,NULL); | |
99 | + | |
94 | 100 | bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); |
95 | 101 | textdomain(PACKAGE_NAME); |
96 | 102 | ... | ... |