<div dir="ltr"><div>This sounds like a good idea to me.<br></div><div><br></div><div>Stuart<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 Jun 2020 at 05:53, Brad Wood &lt;<a href="mailto:bdw429s@gmail.com">bdw429s@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I&#39;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&#39;s not another rewrite engine out there I&#39;ve seen that makes it this easy to debug what&#39;s happening.  The trace level logging gives you a full blow-by-blow of each rule that&#39;s processed, what the input was, and what the result of each condition was.  <div><br></div><div>As much as I love Undertow&#39;s predicates and handlers, the logging is, well, abysmal :)  I&#39;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:</div><div><ul><li>Override the toString() method in each of the built-in predicates and handlers to create a basic text representation of them that isn&#39;t too far from the predicate language.  </li><li>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.  </li><li>I&#39;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.</li><li>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&#39;t working correctly</li></ul><div>So again, I&#39;m offering to work on this and contribute it to Undertow as a pull, but I&#39;d like some feedback on my idea and a general sanity check on whether I&#39;m wasting my time here.  Well, honestly, I&#39;ll probably do the work regardless because the user&#39;s of my Undertow-powered tool will need it, but I&#39;d like to know if these improvements would be welcomed into the core.</div></div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div></div></div>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div>