Better serilog support

Fixes #381 and #386