OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

Record all log lines, and don't let logging alter the test run #526

Closed LukeButters closed 1 year ago

LukeButters commented 1 year ago

Background

An issue exists in which recording trace logs appears to:

Results

Logging is now done to a queue, which is async written to disk. This means:

The queue is used over a lock to avoid logging introducing a hidden lock which could cause code to become dependent on the lock.

How to review this PR

Quality :heavy_check_mark:

Pre-requisites

LukeButters commented 1 year ago

@borland points out it might make more sense to use a serilog file sink. That probably would make more sense, since I suspect we could just write directly to the artifact's folder and it looks like it supports buffering so maybe everything is done out of the critical I am not sure. Talking to @acodrington he found that the serilog file sinks didn't do exactly what we needed, "since we need a sink that can handle multiple files".