Limit log lines to 1024 characters.

Fixes #16