<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Just to be absolutely clear – are you not beginning to introduce new functionality in the logging api? Something looking – for now –rather close to a subset of what the Expression Language in JavaEE applications does?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>There is nothing wrong with having complex logging strings, but you can do what you want in your application rather simply by mapping to {}-strings and swapping the arguments and _<i>then</i>_ send the result to the logging layer.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(My bad about the Groovy snippets – I was thinking of logback.xml and appender layout strings (or whatever they are called today?))<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></a></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> logback-user-bounces@qos.ch [mailto:logback-user-bounces@qos.ch] <b>On Behalf Of </b>Chris Pratt<br><b>Sent:</b> 11. februar 2013 17:18<br><b>To:</b> logback users list<br><b>Subject:</b> Re: [logback-user] commons-logging -> sl4j -> logback<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p>Ummm, this has nothing to do with log configuration. So how would Groovy log configuration help?<br> (*Chris*)<o:p></o:p></p><div><p class=MsoNormal>On Feb 11, 2013 3:42 AM, "Thorbjørn Ravn Andersen" <<a href="mailto:thunderaxiom@hotmail.com">thunderaxiom@hotmail.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You have started on the journey which will eventually result in that you have embedded _<i>yet</i>_ another runtime scripting language inside your java program[1]. This is what most “I need more power from my configuration strings” end up with in my experience.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>At this point I think you should rethink your use-cases. What do you actually need? Would it be solvable e.g. with Groovy code in your logback configuration file instead?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p style='margin-bottom:6.0pt;line-height:14.4pt;background:white'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[1] From Wikipedia: </span><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Greenspun's tenth rule of programming</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'> is an </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Aphorism" target="_blank" title=Aphorism><span lang=EN-US style='color:#0B0080;text-decoration:none'>aphorism</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'> in </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Computer_programming" target="_blank" title="Computer programming"><span lang=EN-US style='color:#0B0080;text-decoration:none'>computer programming</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'> and especially </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Computer_programming_language" target="_blank" title="Computer programming language"><span lang=EN-US style='color:#0B0080;text-decoration:none'>programming language</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'> circles that states:</span><sup><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Greenspun's_tenth_rule#cite_note-1" target="_blank"><span lang=EN-US style='color:#0B0080;text-decoration:none'>[1]</span></a><a href="http://en.wikipedia.org/wiki/Greenspun's_tenth_rule#cite_note-graham-2" target="_blank"><span lang=EN-US style='color:#0B0080;text-decoration:none'>[2]</span></a></span></sup><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:white'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Any sufficiently complicated </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/C_(programming_language)" target="_blank" title="C (programming language)"><span lang=EN-US style='color:#0B0080;text-decoration:none'>C</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'> or </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Fortran" target="_blank" title=Fortran><span lang=EN-US style='color:#0B0080;text-decoration:none'>Fortran</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'> program contains an ad hoc, informally-specified, </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Computer_bug" target="_blank" title="Computer bug"><span lang=EN-US style='color:#0B0080;text-decoration:none'>bug-ridden</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>, slow implementation of half of </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://en.wikipedia.org/wiki/Common_Lisp" target="_blank" title="Common Lisp"><span lang=EN-US style='color:#0B0080;text-decoration:none'>Common Lisp</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a name="13cc90ffeab5f0b6__MailEndCompose"><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></a><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:logback-user-bounces@qos.ch" target="_blank">logback-user-bounces@qos.ch</a> [mailto:<a href="mailto:logback-user-bounces@qos.ch" target="_blank">logback-user-bounces@qos.ch</a>] <b>On Behalf Of </b>Chris Pratt<br><b>Sent:</b> 8. februar 2013 17:34<br><b>To:</b> logback users list<br><b>Subject:</b> Re: [logback-user] commons-logging -> sl4j -> logback</span><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>In my case, a positional positioning formatter is just the beginning. The most important thing is a formatter that supports reflection, since there is no other way to allow specification of nested object hierarchies without requiring the programmer to always dereference those hierarchies whether the data will be used or not. If you have to call user.getName().getFirstname() to pass to the logging system (not to mention the two '+'s you're likely to need to get it into the message) you have degraded your production performance to get the data you need to debug a potential problem in the field. If you could have specified it as ("User: {0.name.firstname} from {0.address.city}, {0.address.state}",user) it would have incurred no up front cost unless the statement was actually going to be used. The positional nature of the parameters in this case is as much about parameter reuse as it is rearranging.<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> (*Chris*)<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Fri, Feb 8, 2013 at 8:12 AM, David Harkness <<a href="mailto:david.h@highgearmedia.com" target="_blank">david.h@highgearmedia.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Fri, Feb 8, 2013 at 12:24 AM, Thorbjørn Ravn Andersen <<a href="mailto:thunderaxiom@hotmail.com" target="_blank">thunderaxiom@hotmail.com</a>> wrote:<o:p></o:p></p></div><div><div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><div><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I think the primary focus for this facility has been raw speed.</span><o:p></o:p></p></div></div></blockquote><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>As well it should, IMHO. The goal for me is to provide a meaningful diagnostic of what's going on without impacting the running system too much, both when logging is turned on and off.<o:p></o:p></p></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In my understanding the primary usage of positional is to be able to translate sentences more fluently into another human language.</span><o:p></o:p></p></div></blockquote><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Yes, it allows the parameters in externalized messages to be reordered while translating to other languages. I think if you're going to this much trouble to produce messages for the user, they are important enough to be left on all the time. Thus, you can pay the cost to format the message up-front using a tool more suited to that task and hand them off to the logging system.<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I don't see a strong need for positional parameters.<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> </span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'>David</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> </span><o:p></o:p></p></div></div></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br>_______________________________________________<br>Logback-user mailing list<br><a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br><a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div><p class=MsoNormal><br>_______________________________________________<br>Logback-user mailing list<br><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br><a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><o:p></o:p></p></div></div></body></html>