Define a logger instance method if one is not provided

Fixes #964