asenchi/scrolls — pull request #65 by beanieboi (2014-12-08 12:27:02+00:00)
Title: don’t fail with nil error for an unknown loglevel

hey,

i just ended up with the following error because is used `warn` as a loglevel. the error message is not very useful. i had to dig into the code. this PR raises a StandardError with an explanation and shows the list of allowed log level.

```
NoMethodError:
undefined method `<=' for nil:NilClass
./vendor/bundle/ruby/2.1.0/gems/scrolls-0.3.8/lib/scrolls/log.rb:260:in `log_level_ok?'
./vendor/bundle/ruby/2.1.0/gems/scrolls-0.3.8/lib/scrolls/log.rb:246:in `write'
./vendor/bundle/ruby/2.1.0/gems/scrolls-0.3.8/lib/scrolls/log.rb:115:in `log'
./vendor/bundle/ruby/2.1.0/gems/scrolls-0.3.8/lib/scrolls.rb:99:in `log'
```

What do you think?

best,
ben