Added function to get a log level from a case-insensitive string

Also make enum class