<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 http-equiv=Content-Type content="text/html; charset=iso-8859-1"><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";}
h1
{mso-style-priority:9;
mso-style-link:"Heading 1 Char";
margin-top:24.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Cambria","serif";
color:#365F91;
font-weight:bold;}
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";}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-priority:9;
mso-style-link:"Heading 1";
font-family:"Cambria","serif";
color:#365F91;
font-weight:bold;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
.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'>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.<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'>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?<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 style='mso-margin-top-alt:4.8pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm;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";color:black'>Greenspun's tenth rule of programming</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>is an</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Aphorism" 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";color:black'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>in</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Computer_programming" 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";color:black'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>and especially</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Computer_programming_language" 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";color:black'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>circles that states:</span><sup><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Greenspun's_tenth_rule#cite_note-1"><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"><span lang=EN-US style='color:#0B0080;text-decoration:none'>[2]</span></a></span></sup><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></p><p class=MsoNormal style='line-height:14.4pt;background:white'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Any sufficiently complicated</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/C_(programming_language)" 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";color:black'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>or</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Fortran" 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";color:black'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>program contains an ad hoc, informally-specified,</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Computer_bug" 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";color:black'>, slow implementation of half of</span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><a href="http://en.wikipedia.org/wiki/Common_Lisp" 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";color:black'>.<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'><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> 8. februar 2013 17:34<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><div><p class=MsoNormal>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> (*Chris*)<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>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>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-right:0cm'><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><o:p> </o:p></p></div></div><div><p class=MsoNormal>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> <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-right:0cm'><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><o:p> </o:p></p></div></div><div><p class=MsoNormal>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><o:p> </o:p></p></div><div><p class=MsoNormal>I don't see a strong need for positional parameters.<o:p></o:p></p></div><div><p class=MsoNormal><span style='color:#888888'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'>David<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'><o:p> </o:p></span></p></div></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><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>