accept string `$level` for logger function