Beispiel #1
0
void Monitor::configure(const PropList& props) {

	// Process output
	out.setStream(*OUTPUT(props));
	log.setStream(*LOG(props));

	// process verbosity
	bool verbose;
	if(props.hasProp(VERBOSE))
		verbose = VERBOSE(props);
	else
		verbose = elm::sys::System::hasEnv(VERBOSE_ENV);
	if(verbose) {
		flags |= IS_VERBOSE;
		log_level = LOG_BB;
	}
	else
		flags &= ~IS_VERBOSE;

	// get the log level
	log_level_t level = LOG_LEVEL(props);
	if(level)
		log_level = level;
}