<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 18, 2019 at 1:20 PM James Perkins &lt;<a href="mailto:jperkins@redhat.com">jperkins@redhat.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"><div dir="ltr">Hello All,<br><div>It&#39;s been longer than I&#39;d want to really get into this, but now that I&#39;ve got a start on it I&#39;d like some feedback on the best way to deal with the pattern attribute. For the file it currently just uses a pattern like <font face="monospace, monospace">%h %l %u %t %r %s %b %{i,Referer} %{i,User-Agent}</font>. The problem is that doesn&#39;t really provide a key for the value. What I&#39;m currently using is that same pattern and using the <font face="monospace, monospace">ExchangeAttributeBuilder.getName()</font> as the key. However if the value of <font face="monospace, monospace">getName()</font> changes at some point the data would end up with a different key. This approach doesn&#39;t seem ideal.</div><div><br></div><div>One option would be to switch to some kind of property format type of thing like:</div><div><br></div><div><font face="monospace, monospace">attributes={&quot;remoteHost&quot;=&quot;%h&quot;, &quot;identityUsername&quot;=&quot;%l&quot;}</font></div><div><br></div><div>I&#39;m not sure how user friendly that is though.</div><div><br></div><div>The other option would be to limit it to known exchange attributes, but that would require a change every time a new attribute is added to Undertow itself or we&#39;d have to allow for some kind of custom attribute.</div></div></div></blockquote><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"><div dir="ltr"><div><br></div><div>Any opinions are welcome. Ideally we want something user friendly that&#39;s going to produce consistent keys as that would be part of the structured data contract.</div></div></div></blockquote><div><br></div><div class="gmail_default" style="font-family:&quot;trebuchet ms&quot;,sans-serif">That pattern string also provides order. I suppose that&#39;s not as important with structured data though.</div><div class="gmail_default" style="font-family:&quot;trebuchet ms&quot;,sans-serif"><br></div><div class="gmail_default" style="font-family:&quot;trebuchet ms&quot;,sans-serif">Perhaps two alternative attributes, one that&#39;s a pattern String and then one that&#39;s complex like your example?  The pattern string is documented with the values it supports and the names of the keys it will use for those values. (Those keys are set in the WF code, not pulled from <span style="font-family:monospace,monospace">ExchangeAttributeBuilder</span>.) If you want other key names or other values you have to use the complex attribute.</div><div class="gmail_default" style="font-family:&quot;trebuchet ms&quot;,sans-serif"><br></div><div class="gmail_default" style="font-family:&quot;trebuchet ms&quot;,sans-serif">That&#39;s kind of kludgy but it makes the hopefully common case simple.</div><div class="gmail_default" style="font-family:&quot;trebuchet ms&quot;,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 18, 2019 at 8:10 AM James Perkins &lt;<a href="mailto:jperkins@redhat.com" target="_blank">jperkins@redhat.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"><div dir="ltr">Hello All,<div>I&#39;ve created a proposal [1] for JSON access logging. Any feedback is welcome.</div><div><br></div><div>[1]: <a href="https://github.com/wildfly/wildfly-proposals/pull/176" target="_blank">https://github.com/wildfly/wildfly-proposals/pull/176</a><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-330480333507350851gmail-m_1263520789966298393gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>James R. Perkins</div><div>JBoss by Red Hat</div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-330480333507350851gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>James R. Perkins</div><div>JBoss by Red Hat</div></div></div></div></div>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Brian Stansberry<div>Manager, Senior Principal Software Engineer</div><div>Red Hat</div></div></div></div>