How to solve the below shown security-hotspot error raised for logging, best method to loggingin python within sonarqube-rules
FORMAT=(“%(asctime)s:%(filename)s:%(funcName)s:%(lineno)d:%(message)s”)
logging.baseConfig(stream=sys.stdout, format = FORMAT, level = logging.DEBUG)
Must-share information (formatted with Markdown):
- which versions are you using ----> SonarQube
- how is SonarQube deployed ----> Docker
- what are you trying to achieve ----> How to solve this Security Hotspot
- what have you tried so far to achieve this ----> Tried different suggestions given in Sonarqube.
I am using logging module in python as the logger. When I ran the package through Sonarqube for the code smells and security hotspots, I found out that there was a security hotspot raised which was due to logging instantiation.