Thanks !
May be add a note on pycentral README too (on github ?)
------------------------------
PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...
PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)
PowerArubaCL: Powershell Module to use Aruba Central
PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..
ACEP / ACMX #107 / ACDX #1281
------------------------------
Original Message:
Sent: Aug 24, 2021 07:03 PM
From: Karthikeyan Dhandapani
Subject: Set logging level or disable logging in Pycentral SDK
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 loggingcentral.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 loggingimport loggingimport syslogging.disable(sys.maxsize)
------------------------------
Karthikeyan Dhandapani
------------------------------