LabSid-USP/RUBEM

Configure logging settings based on a configuration file

Closed this issue · 1 comments

Description

  • Currently, the application lacks the capability to dynamically configure logging settings based on a configuration file. The ideal process is to have the logging configuration (like log level, output file, format, etc.) defined in an appsettings.json file located in the root directory of the application;
  • In the absence of this file, the application should revert to a predefined fallback configuration;
  • This issue addresses the need for a more flexible and robust logging setup that can adapt to different environments and requirements.

Solution

  • Implement a feature where the application first attempts to load logging configurations from an appsettings.json file;
  • This file should include settings such as log level, format, and output destinations;
  • If the appsettings.json file is not found in the application's root directory, the application should automatically switch to a default logging configuration. This ensures that logging is always operational, regardless of the presence of the external configuration file;
  • Error handling should be in place to manage any issues encountered while reading or parsing the appsettings.json file.

Alternative solution(s)

  • N/A

Additional context

  • N/A

This issue is stale because it has been open for 30 days with no activity.