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);  g_log_set_always_fatal((GLogLevelFlags)0);  cl_log_set_facility(LOG_LOCAL7); cl_log_set_entity(crm_system_name); cl_log_send_to_logging_daemon(TRUE);  CL_SIGNAL(DEBUG_INC, alter_debug); CL_SIGNAL(DEBUG_DEC, alter_debug);
crm_log_init(crm_system_name); set_crm_log_level(LOG_VERBOSE);
main(int argc, char ** argv){	gboolean allow_cores = TRUE;	int argerr = 0;	int flag;	/* 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_facility(LOG_LOCAL7);	cl_log_set_entity(crm_system_name);	cl_log_send_to_logging_daemon(TRUE);	CL_SIGNAL(DEBUG_INC, alter_debug);	CL_SIGNAL(DEBUG_DEC, alter_debug);	CL_SIGNAL(SIGTERM, tengine_shutdown);  	set_crm_log_level(LOG_VERBOSE);	crm_debug("Begining option processing");	while ((flag = getopt(argc, argv, OPTARGS)) != EOF) {		switch(flag) {			case 'V':				alter_debug(DEBUG_INC);				break;			case 'h':		/* Help message */				usage(crm_system_name, LSB_EXIT_OK);				break;			case 'c':				allow_cores = TRUE;				break;    			default:				++argerr;				break;		}	}    	crm_debug("Option processing complete");	if (optind > argc) {		++argerr;	}    	if (argerr) {		usage(crm_system_name,LSB_EXIT_GENERIC);	}    	/* read local config file */	if(allow_cores) {		crm_info("Enabling coredumps");		cl_set_corerootdir(DEVEL_DIR);	    		cl_enable_coredumps(1);		cl_cdtocoredir();		crm_debug("Coredump processing complete");	}    	crm_debug("Starting...");	return init_start();}