Skip to content

Commit 5d2a05d

Browse files
authored
Merge pull request #22 from 40ants/fix-unreadable-objects
Fixed error on printing a backtrace when *PRINT-READABLY* is T
2 parents 7df9566 + 77d6499 commit 5d2a05d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/changelog.lisp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@
1919
"HTTP"
2020
"ASDF"
2121
"TRACEBACK-TO-STRING"))
22+
(0.11.1 2025-10-05
23+
"
24+
## Fixed
25+
26+
Previously you may encounter this sort of errors when trying to get a backtrace or use LOG4CL-EXTRAS/ERROR:WITH-LOG-UNHANDLED macro:
27+
28+
```
29+
Traceback (most recent call last):\n[unable to format because of Unable to get traceback because of another error during printing:\n#<PRINT-NOT-READABLE {1213990E43}> cannot be printed readably.\"},\"level\":\"ERROR\",\"message\":\"Unhandled exception\",\"timestamp\":\"2025-10-05T16:23:40.869358Z\"
30+
```
31+
32+
This error occured when `*print-readably*` variable was bound to `T`.
33+
34+
Now LOG4CL-EXTRAS/ERROR:PRINT-BACKTRACE function binds `*print-readably*` to `NIL` when rendering a backtrace. This might change how do your backtraces look like.
35+
")
2236
(0.11.0 2024-03-01
2337
"
2438
## Changed

src/error.lisp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ how to not log secret values.
307307
But you can change this by providing an argument FORMAT-CONDITION. It should be a
308308
function of two arguments: `(stream condition)`.
309309
"
310-
(let ((frames (get-backtrace)))
310+
(let* ((frames (get-backtrace))
311+
(*print-readably* nil))
311312
(with-output-to-stream (stream stream)
312313
(handler-case
313314
(progn

0 commit comments

Comments
 (0)