Primary motivation for this change is to create separation of concerns
for log sink configuration. The LoggerFactory was becoming too large and
had too many responsibilities.
Later on this will help facilitate extension of log functionality while
respecting the Open Closed Principle.
Setting `NO_COLOR=1` in your environment disables ANSI coloring in
console output. This is primarily useful in scenarios such as scripting
and piping output to files.
See: https://no-color.org/Fixes#223
- Centralize sanitization into a custom Serilog enricher
- More log sites pass the exception object in
- Console output now consistently only prints the mssage, but not the
stack trace.
- File output always outputs the stack trace.
Additionally, there are fixes to several SonarLint issues.
Previously, the exception stack trace was omitted to simplify the
console output. However, some situations occurred where an exception was
logged but I couldn't tell where it came from. This made certain rare
bugs impossible to fix.
My philosophy at this point is: If something exceptional happens, we
don't really care about a "clean" console output anymore...