<div dir="ltr"><div>You can use simple curl requests to translate your files. The following scripts work on OSX, but you could easily adapt them for other *nixes if necessary.</div><div><br></div><div><br></div><div>logback_xml_to_groovy.sh:<br>

<br></div><div><font face="courier new, monospace">#!/bin/bash</font></div><div><span style="font-family:'courier new',monospace">##############################################</span><br></div><div><span style="font-family:'courier new',monospace"># Prints the groovy equivalent of the given logback.xml file.</span></div>

<div><span style="font-family:'courier new',monospace"># Redirect to a file.</span></div><div><span style="font-family:'courier new',monospace">#</span></div><div><font face="courier new, monospace"># Usage:</font></div>

<div><font face="courier new, monospace">#   $ logback_xml_to_groovy.sh path/to/logback.xml > path/to/file.groovy</font></div><div><font face="courier new, monospace">#</font></div><div><font face="courier new, monospace">##############################################</font></div>

<div><font face="courier new, monospace">[ -z $1 ] && echo 'syntax error' && exit 1</font></div><div><font face="courier new, monospace">printf val=%s $(cat $1 | curl -Gso /dev/null -w %{url_effective} --data-urlencode @- "" | cut -c 3-) | curl -X POST -d @-  <a href="http://logback.qos.ch/translator/dsl/asGroovy">http://logback.qos.ch/translator/dsl/asGroovy</a></font><br>

</div><div><br></div><div><br></div><div>log4j_to_logback.sh</div><div><br></div><div><div><font face="courier new, monospace">#!/bin/bash</font></div><div><span style="font-family:'courier new',monospace">##############################################</span><br>

</div><div><span style="font-family:'courier new',monospace"># Prints the XML equivalent of the given log4j.properties file.</span></div><div><span style="font-family:'courier new',monospace"># Redirect to a file.</span></div>

<div><span style="font-family:'courier new',monospace">#</span></div><div><font face="courier new, monospace"># Usage:</font></div><div><font face="courier new, monospace">#   $ log4j_to_logback.sh path/to/log4j.properties > path/to/logback.xml</font></div>

<div><font face="courier new, monospace">#</font></div><div><font face="courier new, monospace">##############################################</font></div></div><div><span style="font-family:'courier new',monospace">[ -z $1 ] && echo 'syntax error' && exit 1</span><font face="courier new, monospace"><br>

</font></div><div><font face="courier new, monospace">printf val=%s $(cat $1 | curl -Gso /dev/null -w %{url_effective} --data-urlencode @- "" | cut -c 3-) | curl -X POST -d @- <a href="http://logback.qos.ch/translator/dsl/propertiesToXML">http://logback.qos.ch/translator/dsl/propertiesToXML</a></font><br>

</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 17, 2013 at 7:37 PM, Justin <span dir="ltr"><<a href="mailto:crynax@yahoo.com" target="_blank">crynax@yahoo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif">Anyone?<div><span></span></div><div>
<br>
</div>  <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <hr size="1">  <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Justin <<a href="mailto:crynax@yahoo.com" target="_blank">crynax@yahoo.com</a>><br>

 <b><span style="font-weight:bold">To:</span></b> "<a href="mailto:logback-dev@qos.ch" target="_blank">logback-dev@qos.ch</a>" <<a href="mailto:logback-dev@qos.ch" target="_blank">logback-dev@qos.ch</a>> <br>

 <b><span style="font-weight:bold">Sent:</span></b> Monday, October 7, 2013 11:49 AM<br> <b><span style="font-weight:bold">Subject:</span></b> [logback-dev] Source for PropertiesTranslator<br> </font> </div> <div><div><div class="h5">

<br><div><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div>Hi all,</div><div><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

Is source or pseudo code available for PropertiesTranslator?</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<a href="http://logback.qos.ch/translator/" target="_blank">http://logback.qos.ch/translator/</a></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<a href="http://logback.qos.ch/translator/asGroovy.html" target="_blank">http://logback.qos.ch/translator/asGroovy.html</a></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">I'm interested in upgrading existing customer installations from log4j to logback without sending them to the website. Either XML or Groovy is acceptable.<br>

</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

Thanks for any help,</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">Justin</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">

</div></div></div></div><br></div></div>_______________________________________________<br>logback-dev mailing list<br><a href="mailto:logback-dev@qos.ch" target="_blank">logback-dev@qos.ch</a><br><a href="http://mailman.qos.ch/mailman/listinfo/logback-dev" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-dev</a><br>

<br></div> </div> </div>  </div></div><br>_______________________________________________<br>
logback-dev mailing list<br>
<a href="mailto:logback-dev@qos.ch">logback-dev@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-dev" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-dev</a><br></blockquote></div><br></div>