Beispiel #1
0
	void configure(const LLSD& config)
	{
		Globals& g = Globals::get();
		Settings& s = Settings::get();
		
		g.invalidateCallSites();
		s.functionLevelMap.clear();
		s.classLevelMap.clear();
		s.fileLevelMap.clear();
		
		setPrintLocation(config["print-location"]);
		setDefaultLevel(decodeLevel(config["default-level"]));
		
		LLSD sets = config["settings"];
		LLSD::array_const_iterator a, end;
		for (a = sets.beginArray(), end = sets.endArray(); a != end; ++a)
		{
			const LLSD& entry = *a;
			
			ELevel level = decodeLevel(entry["level"]);
			
			setLevels(s.functionLevelMap,	entry["functions"],	level);
			setLevels(s.classLevelMap,		entry["classes"],	level);
			setLevels(s.fileLevelMap,		entry["files"],		level);
		}
	}
Beispiel #2
0
	void configure(const LLSD& config)
	{
		AIAccess<Settings> settings_w(Settings::get());
		AIAccess<Globals>(Globals::get())->invalidateCallSites();
		settings_w->functionLevelMap.clear();
		settings_w->classLevelMap.clear();
		settings_w->fileLevelMap.clear();
		settings_w->tagLevelMap.clear();
		settings_w->uniqueLogMessages.clear();
		
		setPrintLocation(settings_w, config["print-location"]);
		setDefaultLevel(settings_w, decodeLevel(config["default-level"]));
		
		LLSD sets = config["settings"];
		LLSD::array_const_iterator a, end;
		for (a = sets.beginArray(), end = sets.endArray(); a != end; ++a)
		{
			const LLSD& entry = *a;
			
			ELevel level = decodeLevel(entry["level"]);
			
			setLevels(settings_w->functionLevelMap, entry["functions"], level);
			setLevels(settings_w->classLevelMap,	 entry["classes"],   level);
			setLevels(settings_w->fileLevelMap,	 entry["files"],	 level);
			setLevels(settings_w->tagLevelMap,		 entry["tags"],		 level);
		}
	}