{
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_error ("message1");
exit (0);
}
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_critical ("message2");
exit (0);
}
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_warning ("message3");
exit (0);
}
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_message ("message4");
exit (0);
}
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "message5");
exit (0);
}
g_setenv ("G_MESSAGES_DEBUG", "foo bar baz", TRUE);
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_log ("bar", G_LOG_LEVEL_INFO, "message5");
exit (0);
}
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_log ("baz", G_LOG_LEVEL_DEBUG, "message6");
exit (0);
}
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_log ("foo", G_LOG_LEVEL_DEBUG, "6");
g_log ("bar", G_LOG_LEVEL_DEBUG, "6");
g_log ("baz", G_LOG_LEVEL_DEBUG, "6");
g_unsetenv ("G_MESSAGES_DEBUG");
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT))
{
+ g_log_set_default_handler (g_log_default_handler, NULL);
g_log (G_LOG_DOMAIN, 1<<10, "message7");
exit (0);
}