I believe this question has been asked before and the person who asked was 
told that what he wanted wasn´t feasible - but I cannot right now find the 
conversation.
Also, maybe some influencing factor has changed so perhaps nowadays there 
is a solution possible for what follows?

Our HTTP front end (nginx with mod_txid) generates unique IDs for incoming 
requests. We pass this request ID onward to our main app and to a few back 
end systems who all include it in their log messages. Combining this with 
high resolution time stamps we´re able to trace a request through all 
systems and can, e.g., easily find out for error messages in back end 
systems what the user input in the corresponding HTTP request was. Logging 
is done via Log4perl and the request id is included in every log message 
through the MDC singleton in Log4perl.

Unfortunately this does not work when we make use of asynchronous request 
handling features in Mojolicious. The MDC store is process-global, but 
there are multiple requests being worked on in the same process. We could 
include the request ID manually in every log message we create, but that´s 
cumbersome and it still wouldn´t get the id in any message that´s generated 
directly by Mojolicious.

Since the log calls are method calls on the App instance and not on the 
controller there is apparently no way to access the request context even if 
we monkey-patch the log method in the app.

Still, it would come in really handy if what I´ve tried to describe could 
be made to work in Mojolicious.
Is there anything we´ve missed?
If not, are there any plans for changing Mojolicious internals which could 
enable us to get it to work?

Thx!
Heiko

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to