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

What´s the rational behind this? No whitespace why? Or do you mean a linebreak before the opening bracket of the test case?