DEV Community

Cover image for Thoughts on: Time-traveling Ruby Logger
Jeff Dwyer
Jeff Dwyer

Posted on

Thoughts on: Time-traveling Ruby Logger

I've been thinking a lot about application context, the core things that our application knows: the current user, the instance it's running on, details about the request.

Pretty often we know all of the context right up front and the beginning of a request, but sometimes we don't figure out this context until later in the request. Sometimes this is annoying. It might be nice to log things details of the request along with the userID at the beginning of a request, but we don't actually know the userID right at the beginning. Or we might want to log more details of the processing, but only if the request errors later on.

I like the ideas in: Time-traveling Ruby Logger

I wonder if there are other ways to extends this thinking. The buffer is a bit like a promise queue that will get called later with more information. I'm curious if this gets other peoples' thoughts flowing too.

Top comments (0)