Jan 20 2023 07:12 AM
Getting the sonarqube warning message for logger safe for Startup files for both Azure function and Bot project . How to solve the warning issue to clear SonarQube issue
Jan 22 2023 09:30 PM
Jan 25 2023 08:57 AM
We are developing a chat bot application and below is the Program.cs code,
public static class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureLogging((logging) =>
{
logging.AddDebug();
logging.AddConsole();
});
webBuilder.UseStartup<Startup>();
});
}
For this code, we are seeing Sonarqube warning "Make sure that this logger's configuration is safe."
Jan 31 2023 02:09 AM
@Lakshmi_145 -
According to SonarQube rules, This rule flags for review code that initiates loggers configuration.
Please have look into this thread-
1.logging - Sonar issue: Make sure that this logger's configuration is safe - Stack Overflow
2. Make sure that this logger's configuration is safe. (#598) · Issues · Kennedy Sanchez / Web-Securit...