Thanks to visit codestin.com
Credit goes to github.com

Skip to content

StructuredLogHandler breaks when args in LogRecord #313

@kwsz

Description

@kwsz

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version: linux
  • Python version: 3.9
  • pip version:
  • google-cloud-logging version: 2.4.0

Steps to reproduce

  1. run the code
  2. only shows 'Name: %s' in the message field

Code example

handler = StructuredLogHandler()
setup_logging(handler)
name = "Amy"
logging.info('Name: %s', name)

Suggestions

I think GCP_FORMAT["message"] should be "%(message)s"

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/python-logging API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions