changed query for clearing log

This should fix https://github.com/bobdenotter/bolt/issues/135

This probably could be done with directly pushing to the core, but it's a nice excuse to try my first pull request.

Now how would this be added to the correct issue?