+ Start a Discussion

How to retrieve deployment error log while using Migration Tool ?

Force.om migration tool is great tool for deployment, I found it faster than any other method, But there is one issue , in case if deployment fail it does not give you error logs(cause of failure of deployment).  Is there any way we can get/generate error logs of deployment ?


Thanks in advance!!


Are you referring to Eclipse (Force.com IDE) or Ant? Both methods will indeed generate a list of errors that occurred, including the file names and line numbers where the errors occurred. You can also enable debugging in both tools if you need a complete log of what happened in the deployment (see the respective online manuals for details).


I am using ANT and I read the manual also, there is an option to show debugs on console window, but it does not create a list of errors. On console it generally gives request time out.


It submits the deployment job and that runs on salesforce side but on console gives time-out. Can you plz direct me to related documentation or process of getting deployment errors.


If the project times out, it will give you a command to resume polling, something like the following:


ant <taskname> -Dsf.asyncRequestId=.....

Just use that command to resume polling...


Also, I found the following bit useful: you can redirect STDERR to a file so you get a full log. In Windows, it looks like this:


ant <taskname> -D... 2> errors.log

The last part causes Windows to create a file called errors.log that will contain the errors, if any, when the process completes.


Thanks for the information, I know it , but It will show the current status of deplopyment job, if it got any error before firing this command , that is lost, again it has a maximumj limit of request time, then it will again timed-out. Like in eclipse it holds the system until the deployment completes and shows the list of errors at the end, in ANT i want that type of funtionality. is that possible ?


You can use maxPoll and pollWaitMillis on a target to adjust the time that will be spent waiting on the server. Defaults are 20 and 10000 (so a total of 200 seconds, or 3 minutes and 20 seconds). You could change it to some larger value, like 50 and 50000 (or 2500 seconds, or nearly an hour). Your milage may vary, so feel free to adjust these values. Use small increments for maxPoll (10-20 at a time) and about 10000 increments for pollWaitMillis.