accept string error levels for logger function