Skip to content

Logger to support arbitrary key=value style arguments in log statements #1167

Closed

Description

@heitorlessa

Original author: @CeeBeeCee

Runtime: Python

Is your feature request related to a problem? Please describe

As per discussion originally posted on Python repo, this feature request is related to Logger being able to use key value arguments in log statements e.g. logger.info("my message", my_key="value", request_id="123d023f0-alk322f").

Describe the solution you'd like

I'd like to add additional keys on a per log statement basis by passing an arbitrary number of key=value arguments to .info, .warn, etc..

Describe alternatives you've considered

  1. Use extra={} parameter as supported by Logger and in standard logging library
  2. Continue to use structlog

If you provide guidance, is this something you'd like to contribute?

Additional context

Activity

  1. heitorlessa commented on Aug 11, 2021

    @heitorlessa
    ContributorAuthor

    cc @pankajagrawal16 @saragerion @cakepietoast as I added all_runtimes label

  2. saragerion commented on Jan 20, 2022

    @saragerion
  3. heitorlessa commented on Oct 26, 2022

    @heitorlessa
    ContributorAuthor

    This will be available in the next release 🎉 !!! cc @eoinsha

    image

  4. github-actions commented on Oct 26, 2022

    @github-actions
    Contributor

    ⚠️COMMENT VISIBILITY WARNING⚠️

    This issue is now closed. Please be mindful that future comments are hard for our team to see.

    If you need more assistance, please either tag a team member or open a new issue that references this one.

    If you wish to keep having a conversation with other community members under this issue feel free to do so.

  5. github-actions commented on Oct 31, 2022

    @github-actions
    Contributor

    This is now released under 2.1.0 version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions