
@d_run So loggers and receivers know about this extra data
element. You can use that, and not need to re-invent a system that knows about loggers, levels, and receivers.
I think one caveat is that some log receivers will ignore the data value (e.g. not print/show/write it). So you might need to define/use your own. But you might have planned to do this, anyway.
Another caveat is that define-logger
defines log-xxx
wrappers around log-message
that are “stringy”. However it’s not difficult to define such functions yourself, by hand. And probably not too difficult to make your own define-logger
-like macro that does this.
Whether that qualifies as needing to roll your own system, I’ll let you judge. :simple_smile: IMHO I’d say no, not qualitatively — but there’s some small quantity of things you’d need to add.

This was a half-hearted attempt at adding structured logging and log4j/python loggers to the builtin Racket logging. I never got around to making a log receiver that could handle the rich events. https://github.com/samdphillips/racket-utils/blob/master/utils/logging.rkt

Ah i somehow missed the data
element as i always have been using the log-xxx
wrappers

I didn’t even know about it until I wrote my first log receiver, and I was like, “the data
… what?” I don’t think it’s used frequently. But it’s there when you need it. If the logger system were the Win32 API, data
would be the dwUser
parameter. :wink:

this is super helpful

London Racket Meet-up
Thursday 9th April 1–2pm
Meet at 1pm at ‘The Last Word’ (cafe)[1] and after introductions we will move to The Alan Turing Institute[2].
[1] The Last Word (cafe in front of British Library) 96 Euston Rd, London NW1 2DB Google maps: https://goo.gl/maps/SbUeExYddSnWPQbz6
[2] The Alan Turing Institute https://www.turing.ac.uk/
It will be casual introductions and chat, though if someone wants to do a short talk or demo that would be most welcome.
Please register at https://forms.gle/XDvr5gtGKb6K2DXh8 (required for access to Turing Institute meeting room)
Please let me know if you are interested, even if you can’t confirm attendance.
Many thanks to Dr James Geddes and The Alan Turing Institute for hosting this event.
Kind regards,
Stephen

PS subscribe to <https://racket-news.com|Racket News>

Is it expected that background expansion might not agree with actual run? I have a file whose background expansion consistently says instantiate-linklet: mismatch ...
, but the actual run is fine.

As a follow-up, which one should I believe? Is it actually fine or not fine?

@harry-chen has joined the channel