This repository was archived by the owner on Sep 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Logging
Navya Canumalla edited this page May 10, 2018
·
2 revisions
ADAL allows applications to perform logging for debugging purposes. The Logger is to be used as below:
from adal import log as adal_logging
test_logger = adal_logging.Logger("TokenRequest", {'correlation_id':'12345'})
test_logger.warn("hello %(name)s", {"name": "John Doe"}, log_stack_trace=True)The log level methods available are warn, info, debug, exception.
Starting from ADAL Python 0.5.1, by default, ADAL logging does not capture or log any PII or OII. The library allows app developers to turn this on by configuring the enable_pii flag on the AuthenticationContext. By turning on PII or OII, the app takes responsibility for safely handling highly-sensitive data and complying with any regulatory requirements.
//PII or OII logging disabled. Default Logger does not capture any PII or OII.
auth_context = AuthenticationContext(...)
//PII or OII logging enabled
auth_context = AuthenticationContext(..., enable_pii=True)