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

Allow for updating the logging context as values are available. #44

Open
palmergs opened this issue Aug 22, 2022 · 0 comments
Open

Allow for updating the logging context as values are available. #44

palmergs opened this issue Aug 22, 2022 · 0 comments

Comments

@palmergs
Copy link

It would be nice for a canonical way to set a value on the logging context when it is available.

E.g.

def wrapped_job(event, context):
    with LoggingContext(event=event) as logging_ctx:
        value = get_value_from_event(event)
        logging_ctx.update({ "newvalue": value })  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant