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

chore(deps): update dependency structlog to v21.5.0 #89

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 12, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
structlog (changelog) ==21.1.0 -> ==21.5.0 age adoption passing confidence

Release Notes

hynek/structlog

v21.5.0

Compare Source

Added
  • Added the structlog.processors.LogfmtRenderer processor to render log lines using the logfmt format.
    #​376
  • Added the structlog.stdlib.ExtraAdder processor that adds extra attributes of logging.LogRecord objects to the event dictionary.
    This processor can be used for adding data passed in the extra parameter of the logging module's log methods to the event dictionary.
    #​209,
    #​377
  • Added the structlog.processor.CallsiteParameterAdder processor that adds parameters of the callsite that an event dictionary originated from to the event dictionary.
    This processor can be used to enrich events dictionaries with information such as the function name, line number and filename that an event dictionary originated from.
    #​380

v21.4.0

Compare Source

Added
  • Added the structlog.threadlocal.bound_threadlocal and structlog.contextvars.bound_contextvars decorator/context managers to temporarily bind key-value pairs to a thread-local and context-local context.
    #​371
Fixed
  • Fixed import when running in optimized mode (PYTHONOPTIMIZE=2 or python -OO)
    .
    #​373

v21.3.0

Compare Source

Added
  • structlog.dev.ConsoleRenderer now has sort_keys boolean parameter that allows to disable the sorting of keys on output.
    #​358
Changed
  • structlog switched its packaging to flit.
    Users shouldn't notice a difference, but (re-)packagers might.
  • structlog.stdlib.AsyncBoundLogger now determines the running loop when logging, not on instantiation.
    That has a minor performance impact, but makes it more robust when loops change (e.g. aiohttp.web.run_app()), or you want to use sync_bl before a loop has started.
Fixed
  • structlog.processors.TimeStamper now works well with FreezeGun even when it gets applied before the loggers are configured.
    #​364

  • structlog.stdlib.ProcessorFormatter now has a processors argument that allows to define a processor chain to run over all log entries.

    Before running the chain, two additional keys are added to the event dictionary: _record and _from_structlog.
    With them it's possible to extract information from logging.LogRecords and differentiate between structlog and logging log entries while processing them.

    The old processor (singular) parameter is now deprecated, but no plans exist to remove it.
    #​365

v21.2.0

Compare Source

Added
  • structlog.threadlocal.get_threadlocal() and structlog.contextvars.get_contextvars() can now be used to get a copy of the current thread-local/context-local context that has been bound using structlog.threadlocal.bind_threadlocal() and structlog.contextvars.bind_contextvars().
    #​331,
    #​337

  • structlog.threadlocal.get_merged_threadlocal(bl) and structlog.contextvars.get_merged_contextvars(bl) do the same, but also merge the context from a bound logger bl.
    Same pull requests as previous change.

  • structlog.contextvars.bind_contextvars() now returns a mapping of keys to contextvars.Tokens, allowing you to reset values using the new structlog.contextvars.reset_contextvars().
    #​339

  • Exception rendering in structlog.dev.ConsoleLogger is now configurable using the exception_formatter setting.
    If either the Rich or the better-exceptions package is present, structlog will use them for pretty-printing tracebacks.
    Rich takes precedence over better-exceptions if both are present.

    This only works if format_exc_info is absent in the processor chain.
    #​330,
    #​349

  • The final processor can now return a bytearray (additionally to str and bytes).
    #​344

Changed
  • To implement pretty exceptions (see Changes below), structlog.dev.ConsoleRenderer now formats exceptions itself.

    Make sure to remove format_exc_info from your processor chain if you configure structlog manually.
    This change is not really breaking, because the old use-case will keep working as before.
    However if you pass pretty_exceptions=True (which is the default if either rich or better-exceptions is installed), a warning will be raised and the exception will be rendered without prettification.

  • All use of Colorama on non-Windows systems has been excised.
    Thus, colors are now enabled by default in structlog.dev.ConsoleRenderer on non-Windows systems.
    You can keep using Colorama to customize colors, of course.
    #​345

Fixed
  • structlog is now importable if sys.stdout is None (e.g. when running using pythonw). #​313

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/structlog-21.x branch from c6f2b2d to e42e988 Compare November 20, 2021 16:09
@renovate renovate bot changed the title chore(deps): update dependency structlog to v21.2.0 chore(deps): update dependency structlog to v21.3.0 Nov 20, 2021
@renovate renovate bot force-pushed the renovate/structlog-21.x branch from e42e988 to fe08dc9 Compare March 7, 2022 16:10
@renovate renovate bot changed the title chore(deps): update dependency structlog to v21.3.0 chore(deps): update dependency structlog to v21.5.0 Mar 7, 2022
@renovate
Copy link
Contributor Author

renovate bot commented Mar 23, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@ymotongpoo ymotongpoo merged commit 861b773 into master Sep 20, 2023
@renovate renovate bot deleted the renovate/structlog-21.x branch August 6, 2024 08:39
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

Successfully merging this pull request may close these issues.

2 participants