Register the logger for produced messages

Related to henrikbjorn/Bernard#40

Use the logger service if defined to log messages.