- Make sure you have a somewhat recent version of racket-mode (e.g. latest from MELPA).
- Use C-c C-l a.k.a.
M-x racket-logger
to open a racket-logger-mode
buffer.
- If you have any problems or questions, feel free to open an issue.
Update: The above instructions don't really answer why your own program isn't getting a log event. This is a really interesting bug -- thanks! More conversation on the issue thread. When I figure it out, I'll try to come back here and update this answer again with something hopefully interesting and educational about Racket logging.
Update: This turned out to be a "what was I thinking?" bug in racket-mode. I was creating a new logger:
(define global-logger (make-logger))
(current-logger global-logger)
rather than just using the existing one:
(define global-logger (current-logger))
The existing logger is special, as the Racket documentation for loggers explains:
On start-up, Racket creates an initial logger that is used to record events from the core run-time system. For example, an 'debug
event is reported for each garbage collection (see Garbage Collection).
I've pushed a commit to a topic branch and when I get all-green from CI I'll merge to master; it should be available via MELPA soon after.