Decorator for basic enter and exit logging for functions.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
The issue describes a decorator that logs function parameters and bound variables on entry, then the return value on exit; it names no files or tests. Start by reading the project’s decorator and context binding APIs to find where this feature could fit. Done means entry and exit logs include the requested values and bindings can be set, reset, or updated.
Written by the indexing model from the issue text.
Description
A decorator that creates a log statement with bound variables at entry and exit of the decorated functions. The bound variables can be set, reset or updated, so every log statement from inside the function can use these.
On entry, the decorator will print the passed passed parameters along with bound variables, and upon exit it will print the returned value if any in the exit log message.
This approach helps in removing the redundant log statements for entry and exit.
The binding of default values unrelated to the context of function in decorator also helps in achieving separation of concerns.
Thanks for the great library.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 302
- Avg merge
- 17m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hynek/structlog
-
bind_contextvars is not thread-safe?Possibly taken @nosmile99 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Transform examples in docs into included source filesPossibly taken @alexchen-sys claimed this 99 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
waiting for feedback
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
[Resource]: LoreOpenresource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hesreallyhim/awesome-claude-code#3234 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openminion/openminion#376 ·
Maintainers usually reply within 1 day
-
Type: ☹︎ Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
posit-dev/great-tables#1028 ·
Maintainers usually reply within 1 day
-
integration: apple_tv
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
home-assistant/core#188282 · 1 comment ·
Maintainers usually reply within 1 day
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"OpenP4: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jeffknupp/association#538 ·