Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

XML

ant simple logging

1
2
3
4
5
6
7
    <target name="-log-init" unless="log.initialized">
        <!-- you can set build.log.dir prior and count on immutability to preserve value -->        
        <property name="log.initialized" value="yes"/>
        <property name="build.log.dir" location="${basedir}"/>
        <record name="${build.log.dir}/build.log" action="start"/>
        <record name="${build.log.dir}/build.dbg" action="start" loglevel="debug"/>
    </target>
https://snipt.net/embed/aaaf2c44a8c421fc546dd3d2b8412526/
https://snipt.net/raw/aaaf2c44a8c421fc546dd3d2b8412526/
aaaf2c44a8c421fc546dd3d2b8412526
xml
XML
8
2016-12-03T23:04:50
True
False
False
/api/public/snipt/19389/
ant-simple-logging
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a> <span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;-log-init&quot;</span> <span class="na">unless=</span><span class="s">&quot;log.initialized&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="c">&lt;!-- you can set build.log.dir prior and count on immutability to preserve value --&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;log.initialized&quot;</span> <span class="na">value=</span><span class="s">&quot;yes&quot;</span><span class="nt">/&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;build.log.dir&quot;</span> <span class="na">location=</span><span class="s">&quot;${basedir}&quot;</span><span class="nt">/&gt;</span> </span><span id="L-5"><a name="L-5"></a> <span class="nt">&lt;record</span> <span class="na">name=</span><span class="s">&quot;${build.log.dir}/build.log&quot;</span> <span class="na">action=</span><span class="s">&quot;start&quot;</span><span class="nt">/&gt;</span> </span><span id="L-6"><a name="L-6"></a> <span class="nt">&lt;record</span> <span class="na">name=</span><span class="s">&quot;${build.log.dir}/build.dbg&quot;</span> <span class="na">action=</span><span class="s">&quot;start&quot;</span> <span class="na">loglevel=</span><span class="s">&quot;debug&quot;</span><span class="nt">/&gt;</span> </span><span id="L-7"><a name="L-7"></a> <span class="nt">&lt;/target&gt;</span> </span></pre></div> </td></tr></table>
ant, logging
Copyrighted, illegal, or inappropriate content? Email [email protected].