Changeset 29156

Show
Ignore:
Timestamp:
18.07.2014 18:41:06 (5 years ago)
Author:
ak19
Message:

Upon ant reset-logs, truncating ext/solr/logs/solr.log too if it exists

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r29143 r29156  
    15861586    It seems to have a problem with cat or </dev/null, with or without the < sign. --> 
    15871587  <target name="reset-logs" description="Empties catalina.out, greenstone.log and contents of web/logs/tmp"> 
    1588     <echo>Truncating catalina.out, greenstone.log and server.log, and emptying ${web.writablehome}/logs/tmp</echo>     
     1588    <echo>Truncating catalina.out, solr.log, greenstone.log and server.log, and emptying ${web.writablehome}/logs/tmp</echo>     
    15891589    <exec executable="rm" os="${os.unix}" dir="${catalina.home}/logs" spawn="false"> 
    15901590      <arg value="-f"/> 
     
    16231623    </exec> 
    16241624 
     1625    <!-- if ext/solr/logs/solr.log exists, truncate it --> 
     1626    <if><bool><available file="${solr-ext.home}/logs/solr.log" type="file"/></bool>      
     1627        <exec executable="rm" os="${os.unix}" dir="${solr-ext.home}/logs" spawn="false"> 
     1628          <arg value="-f"/> 
     1629          <arg value="solr.log"/> 
     1630        </exec>  
     1631        <exec executable="touch" os="${os.unix}" dir="${solr-ext.home}/logs" spawn="false"> 
     1632          <arg value="solr.log"/> 
     1633        </exec>    
     1634        <exec executable="cmd" osfamily="windows" dir="${solr-ext.home}/logs" spawn="false"> 
     1635          <arg line="/c echo. > solr.log"/> 
     1636        </exec> 
     1637    </if> 
     1638     
    16251639    <if> 
    16261640      <bool><available file="${web.writablehome}/logs/tmp" type="dir"/></bool>