accept string error levels for logger function
Merge pull request #1395 from julesjanssen/1.6/develop

accept string `$level` for logger function