MonkeyCanCode opened a new pull request, #2145: URL: https://github.com/apache/polaris/pull/2145
To prepare for showing client request payloads with a debug flag https://apache-polaris.slack.com/archives/C084XDM50CB/p1748501485695739), this PR transitions our output from simple `print` statements to a more robust logging framework. This lays the groundwork for easily controlling debug output, making future enhancements much more straightforward than managing numerous conditional `print` statements. Here are some sample output (current vs new): ``` # list principals (current) ➜ polaris git:(main) ./polaris --profile dev principals list {"name": "root", "clientId": "root", "properties": {}, "createTimestamp": 1753065201451, "lastUpdateTimestamp": 1753065201451, "entityVersion": 1} # list principals (new) ➜ polaris git:(python_client_logger) ./polaris --profile dev principals list 2025-07-20 21:41:09,524 - INFO: PrincipalsCommand: {"name": "root", "clientId": "root", "properties": {}, "createTimestamp": 1753065201451, "lastUpdateTimestamp": 1753065201451, "entityVersion": 1} # create duplicate profile to trigger Exception (current) ➜ polaris git:(main) ./polaris profiles create dev Profile dev already exists. ➜ polaris git:(main) echo $? 1 # create duplicate profile to trigger Exception (new) ➜ polaris git:(python_client_logger) ./polaris profiles create dev 2025-07-20 21:41:22,919 - INFO: ProfilesCommand: Profile dev already exists. Traceback (most recent call last): File "/Users/yong/Desktop/GitHome/polaris/client/python/cli/polaris_cli.py", line 198, in <module> PolarisCli.execute() ~~~~~~~~~~~~~~~~~~^^ File "/Users/yong/Desktop/GitHome/polaris/client/python/cli/polaris_cli.py", line 67, in execute command.execute() ~~~~~~~~~~~~~~~^^ File "/Users/yong/Desktop/GitHome/polaris/client/python/cli/command/profiles.py", line 132, in execute self._create_profile(self.profile_name) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/Users/yong/Desktop/GitHome/polaris/client/python/cli/command/profiles.py", line 83, in _create_profile raise Exception(f"Profile {name} already exists.") Exception: Profile dev already exists. ➜ polaris git:(python_client_logger) echo $? 1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
