Assert on logger middleware.

Closes #44.