All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mentalog.config.LogConfigParam Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package org.mentalog.config;

import org.mentalog.Log;

public class LogConfigParam extends ConfigParam {

	public LogConfigParam(String name, Log defValue) {
		super(name, defValue);
	}

	@Override
	protected Log parseString(String level) {
		String formattedLevel = level.substring(0, 1).toUpperCase() + level.substring(1, level.length()).toLowerCase();
		try {
			return Enum.valueOf(Log.class, formattedLevel);
		} catch (Exception e) {
			return null;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy