Fix String cast to Level in LogFactory