使用exception追踪报错时,超过127个字节会自动截断
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.1k
- Forks
- 817
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 4
Description
当传入的内容超过到127时,会自动截断后三位为"...",如何取消这种截断
2023-10-12 12:30:56.865 | ERROR | main::25 - fadsa
Traceback (most recent call last):
> File "E:\yugu_project\test\test_log.py", line 22, in
test(2, 0)
└ <function test at 0x000001114FF52EE0>
File "E:\yugu_project\test\test_log.py", line 17, in test
res = a + c / b
│ │ └ 0
│ └ 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345...
└ 2
TypeError: unsupported operand type(s) for /: 'str' and 'int'
Contributor guide
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.
Research direction
Reproduce the reported truncation with the example in the issue, including a value longer than 127 bytes and an exception traceback. Trace how Loguru formats exception variable values and identify where the ellipsis is introduced. Done means the traceback preserves the full value or provides a confirmed way to disable truncation, with a regression test for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100