ADR Jeff Tyree and Art Akerman

Introduction : This is a test for me to write ADR’s accordingly to https://github.com/joelparkerhenderson/architecture-decision-record . I will try those ADR and see the final result

ADR005 Logging

TITLE: ADR 005 – Logging

  • Status: accepted

  • Deciders: Andrei Ignat
  • Date: 2023-10-07

Technical Story: Must add some logging library in order to debug problems

Context and Problem Statement

Every time there is a problem, logging could solve the problems by having more details about what is wrong

So I MUST add logging

Decision Drivers

  • Making one library for logging is not so complicated , however

    • the exporters to other systems are cumbersome and difficult

    • also threading is a problem when writing to a file
  • There are already production battle tested libraries that performs the work well.

Considered Options

Decision Outcome

Choosing NLog because it is simpler to configure from a text file

Positive Consequences

Devops should be happy – the logging file for production could be also put into SourceControl without problems.

Negative Consequences

Do not support yet SAMNE logging for a class. Could be alleviated by having DebuggerDisplayAttribute for the class and logging the function

Pros and Cons of the Options

Serilog
  • Good, because Widely adopted

  • Good, because A lot of documentation
  • Good, because Great community
  • Bad, because A bit harder to learn when coming from log4net
NLOG

Advantages

  • Good, because A lot of documentation

  • Good, because Having been around a long time, there are lots of blog posts
  • Good, because Easy to get started when coming from other logging frameworks
  • Bad, because Structured logging is still a bit behind Serilog
  • Bad, because C#-based API is harder to use than Serilog’s fluent API

Links

ADR based on

https://github.com/joelparkerhenderson/architecture-decision-record/tree/main/locales/en/templates/decision-record-template-by-jeff-tyree-and-art-akerman/index.md