Aruba Central's Python SDK (
pycentral)
uses Python's logging module. It is often required to limit what is shown in the logs. Defining logging level or disabling logs can help with this use case.
To set logging level for pycentral SDK:
# To set level for logging. This example is to show logs for level ERROR and above
# central = get_conn_from_file(filename=central_filename, account = "internal")
import logging
central.logger.setLevel(logging.ERROR)
To disable pycentral SDK's logging function:
# To disable the logger of the pycentral SDK, whereas "central" variable is the base class object.
# central = get_conn_from_file(filename=central_filename, account = "internal")
central.logger.disabled = True
[OR] To disable all of Python's Logging function:
# To disable general logging
import logging
import sys
logging.disable(sys.maxsize)
------------------------------
Karthikeyan Dhandapani
------------------------------