Adding the logging functionality

Description

This Pull Request introduces the Logger class, which will be used to log a detailed error to help us have more informations about the causes of errors.

The messages will be as following:

 [CALLER: SOURCE] | 6/10/2021, 2:08:32 PM |  LEVEL | MESSAGE |  ERROR OBJECT |

CALLER: is the controller or the place where the Logger is initialized. SOURCE: a more specific detail, like which API thrown this error. LEVEL: for now, it's only ERROR, maybe later if we decided that we need to log more general info other than errors, this level can be changed to info, warning or any other levels.

Examples of thrown errors:

 [IconsController: iconsAPI] | 6/10/2021, 2:08:32 PM |  ERROR | Icon isn't found |  {statusCode: 404,success:false, message: "icon isn't Found} | 

The errors will be logged in the console and also placed into the logs/error.json file, if you prefer to have a separate log for each controller, we can make it.

Should be merged after #5

Merge request reports

Loading