Skip to content

Commit

Permalink
Add FalconPy native logging support (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes authored Nov 1, 2024
1 parent bb78c44 commit 48b9fb9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions caracara/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def __init__( # pylint: disable=R0913,R0914,R0915
proxy: str = None,
user_agent: str = None,
verbose: bool = False,
debug: bool = False,
debug_record_count: int = None,
sanitize_log: bool = True,
falconpy_authobject: OAuth2 = None,
):
"""Configure a Caracara Falcon API Client object."""
Expand Down Expand Up @@ -110,6 +113,9 @@ def __init__( # pylint: disable=R0913,R0914,R0915
"user_agent": user_agent,
"ssl_verify": ssl_verify,
"timeout": timeout,
"debug": debug,
"debug_record_count": debug_record_count,
"sanitize_log": sanitize_log,
}

self.logger.info(
Expand Down
6 changes: 6 additions & 0 deletions examples/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ profiles:
client_id: clientid123456
client_secret: clientsecret123456
cloud_name: auto
# Enable FalconPy native debugging by setting to True
debug: False
# Number of records to return in a debug
debug_record_count: 100
# Do not disable log sanitization in production environments
sanitize_log: True
logging:
level: debug
examples:
Expand Down

0 comments on commit 48b9fb9

Please sign in to comment.