This sounds like a good idea to me.
Stuart
On Wed, 24 Jun 2020 at 05:53, Brad Wood <bdw429s(a)gmail.com> wrote:
I've been using Tuckey Rewrites for a long time and one of my
favorite
things about it is the very rich amount of debug and trace logging
information it has. There's not another rewrite engine out there I've seen
that makes it this easy to debug what's happening. The trace level logging
gives you a full blow-by-blow of each rule that's processed, what the input
was, and what the result of each condition was.
As much as I love Undertow's predicates and handlers, the logging is,
well, abysmal :) I'd like to do some work to improve what gets sent to the
request_logger for debugging the predicates and handlers that fire for a
request as part of the PredicatesHandler. My high-level approach is as
follows:
- Override the toString() method in each of the built-in predicates
and handlers to create a basic text representation of them that isn't too
far from the predicate language.
- Add logging at key points in the PredicatesHandler that captures
each predicate as it is evaluated as well as the result of that predicate
and the next handler to be invoked.
- I'd probably say a single debug log entry for every matched
predicate for basic high-level debugging of predicates that had some sort
of effect on the request.
- And then a trace log entry with all the juicy details of each
predicate whether it was matched or not for debugging why predicates aren't
working correctly
So again, I'm offering to work on this and contribute it to Undertow as a
pull, but I'd like some feedback on my idea and a general sanity check on
whether I'm wasting my time here. Well, honestly, I'll probably do the
work regardless because the user's of my Undertow-powered tool will need
it, but I'd like to know if these improvements would be welcomed into the
core.
Thanks!
~Brad
*Developer Advocate*
*Ortus Solutions, Corp *
E-mail: brad(a)coldbox.org
ColdBox Platform:
http://www.coldbox.org
Blog:
http://www.codersrevolution.com
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev