ansible / django-ansible-base

Apache License 2.0
18 stars 49 forks source link

Fix issue where RADIUS auth logged to root logger #637

Closed AlanCoding closed 1 week ago

AlanCoding commented 2 weeks ago

I was looking for this, because I made the same kind of mistake in another library.

TBH, I think SonarCloud should create a rule to find these cases. logging.info goes to the root logger. That is almost never what you want. Any configuration of the ansible_base logger will be ignored. I don't think we even customize the root logger in most cases, so the messages would likely be lost.

The python standard library is deceptively permissive of this. Even though these cases are almost certainly a typo/goof, python accepts it as the programmer's intention.

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
50.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud