buildframework/helium/tools/logging/logging.ant.xml
changeset 628 7c4a911dc066
parent 217 0f5e3a7fb6af
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    21 ============================================================================
    21 ============================================================================
    22 -->
    22 -->
    23 <!--* @package framework -->
    23 <!--* @package framework -->
    24 <project name="logging" xmlns:hlm="http://www.nokia.com/helium">
    24 <project name="logging" xmlns:hlm="http://www.nokia.com/helium">
    25     <description>
    25     <description>
    26         Targets related to log parsing, rendaring, upload to diamonds etc.
    26         Targets related to log parsing, rendering, upload to diamonds etc.
    27     </description>
    27     </description>
    28     
       
    29     
    28     
    30     <!-- This is where the preparation build logs are stored.
    29     <!-- This is where the preparation build logs are stored.
    31     @type string
    30     @type string
    32     @scope private
    31     @scope private
    33     -->
    32     -->
    60     <!-- This is where the localisation logs are stored.
    59     <!-- This is where the localisation logs are stored.
    61     @type string
    60     @type string
    62     @scope private
    61     @scope private
    63     -->
    62     -->
    64     <property name="localisation.log.dir" location="${build.log.dir}/localisation"/>    
    63     <property name="localisation.log.dir" location="${build.log.dir}/localisation"/>    
    65     
       
    66     
    64     
    67     <!-- Macro to record content to a separate log file without recording in the main log. -->
    65     <!-- Macro to record content to a separate log file without recording in the main log. -->
    68     <macrodef name="recordStartMacro" uri="http://www.nokia.com/helium">
    66     <macrodef name="recordStartMacro" uri="http://www.nokia.com/helium">
    69         <attribute name="name"/>
    67         <attribute name="name"/>
    70         <attribute name="emacsmode" default="false"/>
    68         <attribute name="emacsmode" default="false"/>
   115             <hlm:record name="${build.cache.log.dir}/temp_ant_build.log" action="stop"/>                    
   113             <hlm:record name="${build.cache.log.dir}/temp_ant_build.log" action="stop"/>                    
   116             <concat destfile="@{log}" append="@{append}">
   114             <concat destfile="@{log}" append="@{append}">
   117                 <filelist dir="${build.cache.log.dir}" files="temp_ant_build.log"/>                        
   115                 <filelist dir="${build.cache.log.dir}" files="temp_ant_build.log"/>                        
   118             </concat>
   116             </concat>
   119             <delete file="${build.cache.log.dir}/temp_ant_build.log" failonerror="false"/>
   117             <delete file="${build.cache.log.dir}/temp_ant_build.log" failonerror="false"/>
   120             <echo>End of filtering @{log} for passwords</echo>
       
   121         </sequential>
   118         </sequential>
   122     </macrodef>
   119     </macrodef>
   123     
   120     
   124     
   121     
   125     <!-- Extract logs from text file and process error/warnings/components name etc
   122     <!-- Extract logs from text file and process error/warnings/components name etc
   219                 <hlm:antmetadatainput>
   216                 <hlm:antmetadatainput>
   220                     <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" />
   217                     <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" />
   221                     <metadatafilterset refid="@{filterref}" />
   218                     <metadatafilterset refid="@{filterref}" />
   222                 </hlm:antmetadatainput>
   219                 </hlm:antmetadatainput>
   223             </hlm:metadatarecord>
   220             </hlm:metadatarecord>
   224             <hlm:generateBuildStatus dbfile="@{database}" output-dir="${build.cache.log.dir}/signals" file="@{name}" />
   221             <hlm:generateBuildStatus dbfile="@{database}" output-dir="${build.cache.log.dir}/signals" file="${build.cache.log.dir}/@{name}" />
   225             <if>
   222             <if>
   226                 <isset property="@{phase}.log.dir" />
   223                 <isset property="@{phase}.log.dir" />
   227                 <then>
   224                 <then>
   228                     <mkdir dir="${@{phase}.log.dir}"/>
   225                     <mkdir dir="${@{phase}.log.dir}"/>
   229                     <copy todir="${@{phase}.log.dir}" failonerror="false">
   226                     <copy todir="${@{phase}.log.dir}" failonerror="false">
   303     </macrodef>
   300     </macrodef>
   304     
   301     
   305     
   302     
   306     <!-- Merges all XML log files ending in ".log2.xml" in the build log directory
   303     <!-- Merges all XML log files ending in ".log2.xml" in the build log directory
   307     into a single summary log file. -->
   304     into a single summary log file. -->
   308     <target name="log-merge"  unless="metadata.enable">
   305     <target name="log-merge">
   309         <mkdir dir="${build.log.dir}"/>
   306         <mkdir dir="${build.log.dir}"/>
   310         <dependset>
   307         <dependset>
   311             <srcfileset dir="${build.log.dir}" includes="**/${build.id}*.log.xml"/>
   308             <srcfileset dir="${build.log.dir}" includes="**/${build.id}*.log.xml"/>
   312             <targetfileset file="${build.summary.file}"/>
   309             <targetfileset file="${build.summary.file}"/>
   313         </dependset>
   310         </dependset>