Moudiz Moudiz - 9 months ago 33
Java Question

SVN Ant echo the error from the logfile

How to echo the error in the log-file ?

<svn refid="svn.settings" logFile="C:/Logfile.log">
<export destpath="LOCAL Location"
srcUrl="Source Url" />
</svn>


When I run the above
export
I dont get error in the build, the error is displayed in the log file ,URL doesn't exists.

I want to catch the error in the logfile and echo it , how to do that ?

Answer Source

If you don't need the logfile, you can omit the logfile parameter and it will be printed to the console. Also see here

Otherwise you can just load the file and print to console with a seperate ant task:

<loadfile property="svnLog" srcFile="C:/Logfile.log"/> 
<echo>${svnLog}</echo>