Closed alastairs closed 5 years ago
Thanks @phildrip. What do you mean by "explicitly configure logging"?
as in, tell liblog to log to the console, instead of serilog, or log4net etc
Oh, gotcha. You'd need to implement Waives.Http.Logging.ILog
, but it's a single method interface with a fairly clear signature.
This PR replaces Waives.Http.Logging with LibLog, as identified following the spike #71.
The tests are written with a few helper functions (mostly fluent assertion-style extension methods). The
Logger.CaptureTo()
function sets up a correlation ID for each test, adds that as a property on the log events written during that test's execution, and filters theSerilog.Sinks.Observable
to only the events with that correlation ID. This approach was inspired by @damianh's recommendations for testing log output and @sandermvanvliet's fluent assertions for his in-memory Serilog sink.Fixes #77.