adobe-apiplatform / user-sync.py

Application for synchronizing Adobe customer directories via the User Management API
https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/
MIT License
87 stars 67 forks source link

VA Feature Request: When an LDAP connection failure occurs in the user sync tool, the log file should output information about the failure. #841

Open sacordero opened 7 months ago

sacordero commented 7 months ago

Is your feature request related to a problem? Please describe. When an LDAP connection failure occurs in the user sync tool, the log file should output information about the failure.

Describe the solution you'd like This should not require a “debug” mode to be set, because it’s basic troubleshooting information. We’re not trying to debug the code. If the DNS lookup failed, that should be included in the log. If the DNS lookup succeeded but the LDAP connection failed, the log file should indicate the IP address of the LDAP connection that failed.

adorton-adobe commented 5 months ago

The sync tool currently does report an error when an LDAP server cannot be reached.

Example:

2024-04-02 11:18:09 27184 CRITICAL main - LDAP connection failure: invalid server address

To provide more information, we can potentially incorporate logging from the ldap3 module. This would be enabled and configured from the LDAP configuration file. Enabling ldap3 logging would add any log messages generated by that module. The sync tool would have limited control over what is logged.

Here is an example of what would be logged for a connection at different levels of detail. Would this suffice for the customer?

https://ldap3.readthedocs.io/en/latest/logging.html#examples