Take the console location from the record (closes #36) #41

Merged
clawbot merged 1 commits from issue-36-console-location into next 2026-10-06 14:34:48 +02:00
1 Commits
Author SHA1 Message Date
clawbot 9710d3f05f Take the console location from the record (closes #36)
check / check (push) Successful in 30s
check / check (pull_request) Successful in 22s
ConsoleHandler found the file and line it prints by walking a fixed
number of stack frames up from itself, which only fit a record logged
through a slog.Logger and delivered through MultiplexHandler. It now
reads them from the record's PC, the call site slog stores, so a
ConsoleHandler used with slog.New and a record passed to Handle
directly print the right location too. A record whose PC is zero
prints ???:0 as before. The README drops its warning about the wrong
location and says how to set PC instead.

Model: opus-5-5
2026-10-06 12:02:43 +00:00