org.mentalog.config.LogConfigParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of menta-log Show documentation
Show all versions of menta-log Show documentation
A log library that embraces the kiss principle.
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;
}
}
}