Skip to content

Conversation

gkevinzheng
Copy link
Contributor

Added name and resource as kwargs to StructuredLogHandler so that calls to client.setup_logging with these kwargs don't crash on unexpected keyword argument exceptions.

Fixes #842

@gkevinzheng gkevinzheng requested review from a team as code owners January 29, 2024 22:31
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: logging Issues related to the googleapis/python-logging API. labels Jan 29, 2024
@gkevinzheng gkevinzheng added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2024
"""
Args:
name (Optional[str]): Placeholder for setup_logging consistency. Does nothing.
resource (Optional[dict]): Placeholder for setup_logging consistency. Does nothing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can probably remove these comments about the args.

Maybe add a line for **kwargs to the Args list here if you want to mention that others are ignored, but that's optional

@gkevinzheng gkevinzheng merged commit 9bc0a37 into main Feb 1, 2024
@gkevinzheng gkevinzheng deleted the structured-log-handler-name branch February 1, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support log name in StructuredLoggingHandler
3 participants