Loggifier.unkrig.de / Tools / Ant task

From unkrig.de
Jump to navigation Jump to search

LOGGIFIER defines a new task "<de.unkrig.loggifier>" that loggifies your code just like the command line tool. See the example to see how to make the new task accessible from inside your ANT script.

Attributes[edit]

selector=glob
Which class files to instrument, e.g. "~**Test*.class". Default is "all files".
out=file
Where to write the output file or directory. Default is to perform an "in-place" loggification.
keepOriginals=boolean
Keep copies of the original files (e.g. .MyClass.class.orig and .MyJar.jar.orig).

Subelements[edit]

<rule>text</rule>
A loggification rule, e.g. 'STORE=FINE'
Resource Collection (<fileset> etc.)
The files to loggify (.class, .jar, .war, .ear, ...)

Example[edit]

 <project>
     <taskdef classpath="lib/de.unkrig.loggifier.jar" resource="de/unkrig/loggifier/ant.properties" />

     <target name="default">
         <de.unkrig.loggifier>
             <rule>ALL=FINE</rule>
             <fileset file="bin/Main.class" />
         </de.unkrig.loggifier>
     </target>
 </project>