} else { cl_log_set_uselogd(TRUE); crm_info("Enabled log daemon"); } #endif
crm_log_init(const char *entity) {/* 	const char *test = "Testing log daemon connection"; */	/* Redirect messages from glib functions to our handler *//*  	cl_malloc_forced_for_glib(); */	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... - this enum is a bit field (!) */	g_log_set_always_fatal((GLogLevelFlags)0); /*value out of range*/		cl_log_set_entity(entity);	cl_log_set_facility(LOG_LOCAL7);	cl_set_corerootdir(HA_COREDIR);	    	cl_cdtocoredir();		crm_set_env_options();#if 0		cl_log_set_uselogd(FALSE);	if(HA_FAIL == LogToLoggingDaemon(LOG_INFO, test, strlen(test), TRUE)) {		crm_warn("Not using log daemon");	} else {		cl_log_set_uselogd(TRUE);		crm_info("Enabled log daemon");	}#endif	CL_SIGNAL(DEBUG_INC, alter_debug);	CL_SIGNAL(DEBUG_DEC, alter_debug);	return TRUE;}