g_log_set_always_fatal((GLogLevelFlags)0); cl_log_set_entity(crm_system_name); cl_log_set_facility(LOG_LOCAL7); cl_log_send_to_logging_daemon(TRUE); CL_SIGNAL(DEBUG_INC, alter_debug); CL_SIGNAL(DEBUG_DEC, alter_debug);
if (ipc_channel_pair(channels) != IPC_OK) { cl_perror("Can't create ipc channel pair"); exit(1); } G_main_add_IPC_Channel(G_PRIORITY_LOW, channels[1], FALSE, subsystem_msg_dispatch, (void*)process_atest_message, default_ipc_connection_destroy);
main(int argc, char ** argv){    /* Redirect messages from glib functions to our handler */    g_log_set_handler(NULL,		      G_LOG_LEVEL_ERROR      | G_LOG_LEVEL_CRITICAL		      | G_LOG_LEVEL_WARNING  | G_LOG_LEVEL_MESSAGE		      | G_LOG_LEVEL_INFO     | G_LOG_LEVEL_DEBUG		      | G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL,		      cl_glib_msg_handler, NULL);    /* and for good measure... */    g_log_set_always_fatal((GLogLevelFlags)0);        cl_log_set_entity(crm_system_name);    cl_log_set_facility(LOG_LOCAL7);    cl_log_send_to_logging_daemon(TRUE);    CL_SIGNAL(DEBUG_INC, alter_debug);    CL_SIGNAL(DEBUG_DEC, alter_debug);    set_crm_log_level(LOG_DEV);    crm_debug("some log");    cl_log(LOG_DEBUG, "same log");    crm_debug("some log");    cl_log(LOG_DEBUG, "same log");    #if 0    /* read local config file */    crm_debug("Enabling coredumps");    if(cl_set_corerootdir(DEVEL_DIR) < 0){	    cl_perror("cannot set corerootdir");    }    if(cl_enable_coredumps(1) != 0) {	    crm_err("Cannot enable coredumps");    }    if(cl_cdtocoredir() != 0) {	    crm_err("Cannot cd to coredump dir");    }    crm_warn("Calling abort()");    abort();    crm_err("We just dumped core");#endif    return 0;}