Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6979665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:54:55+00:00 2026-05-27T17:54:55+00:00

I am using the ant task <record> to create a log file of the

  • 0

I am using the ant task <record> to create a log file of the output and activity of my ant build script. The problem is:

i am not seeing the names of the targets that are being executed.

For instance: When my target called cleanFW is being executed, i only see the stuff being done inside the target and NOT the name of the target it self. Since this is happening, i have no way of telling when cleanFW began in the log file.

Is there a way to get this cleanFW target name to appear? It was appearing when i was using the flag -logfile. But i had to switch to <record> because i want to record log file and see the output in console.

Using Ant 1.8.2


simple solution

My simple solution to this is to just put an echo in each one of the targets. Just wondering if there was a better way.


sample code where it is not working

<project name="foobar">

<record name="test.txt" action="start" append="true" loglevel="verbose" />

... lots of property stuff here ...

    <target name="cleanFW">
        <record name="test.txtaction="start" append="true" loglevel="verbose"/>
        <mkdir dir="${FOOBAR_OUTPUT}"/>
        <mkdir dir="${FOOBAR_GEN}"/>
        <delete includeemptydirs="true"> 
            <fileset dir="${FOOBAR_BIN}" includes="**/*"/>
            <fileset dir="${FOOBAR_GENERATED}" includes="**/*"/>
            <fileset dir="${FOOBAR_NODES}" includes="**/*"/>
            <fileset dir="${FOOBAR_GEN}" includes="**/*"/>
        </delete>
        <mkdir dir="${FOOBAR_OUTPUT}"/>
        <record name="test.txt" action="stop"/>
    </target>

<record name="test.txt" action="stop"/>   

</project>

The reason why i have the first record name="test.txt" action="start" append="true" loglevel="verbose" /> at the top, is because i want all of the statements and stuff that are before the targets to be displayed too. Like my property sets and all that jazz. I left that junk out because it is not important.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:54:55+00:00Added an answer on May 27, 2026 at 5:54 pm

    I’m at a bit of a loss to explain why exactly, but I think you need to omit the last record ‘stop’ task – the one that is outside of a target.

    Having said that, you can probably omit all of the record tasks except the first ‘start’, and get the result you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem: I'm using the wsimport ant task to create a
I am using Ant's get task to save a file to disk. I am
I have an Ant script that performs a copy operation using the 'copy' task
I am using ssh exec ant task in my script for executing some commands
When i build/deploy my php project using an ant task within eclipse, it creates
I want to create a java classes from the xsd using xjc ant task.
I was trying to deploy a WAR file using the Cargo Ant task version
I'm using the SSHEXEC ant task to run an SSH script against a remote
I am running javac task using ant and I send the output to a
I'm trying to upload a file using an Ant task. If I use Ant

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.