Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FalconPy native logging support #220

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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