3PillarGlobal-Czechia / interview-app-api

API for Interview App.
MIT License
3 stars 1 forks source link

Enable logger for application layer #83

Closed PlesnikJakub closed 2 years ago

PlesnikJakub commented 2 years ago

Description

The current solution for logging uses Serilog. Specifically class Serilog.Log and its static methods. Usage of static methods is not ideal from a testing perspective and it would go against defined architecture in terms of dependency flow.

To enable logging in other layers, if needed, we need to create an interface on the application level and through dependency injection pass logger when desired.

AC

PlesnikJakub commented 2 years ago

After discussion with @robertstriz we found that the current state already provides a solution for this. Serilog usage already registered instance for an interface ILogger so we are able to inject that anywhere we need.

Marking as Done.