How to enable logging in Python LDAP

When writing Python scripts which rely on python-ldap and openLDAP, it is often useful to turn on debug messages as follows:

This is also useful when debugging the LDAP Plugin for Trac.

Published by

Leons Petrazickis

I'm a full-stack developer at IBM Digital Business Group. I do Ruby, Node, Python, Hadoop, Spark, as well as web scale devops with Docker and Terraform. My opinions are my own.