1

I currently have a script that runs a curl function to fetch logs from another server, i am trying to debug some issues with this script and would like to enable logging for this curl function.

I have read that this can be achieved using the --trace file switch.

Can someone help me add this functionality to the below code?, the log must be unique for each curl call, perhaps using the date/time?

        '  Build the cURL command line.
    strcURL = chr(34) & strCodeBase & "curl" & chr(34) & " -s -f -o "
    strcURL = strcURL & chr(34) & strServerDir & strServer & "\gr" & strShortYear & strMonth & strDay & ".zip" & chr(34) & " "

1 Answers1

0

Just add --trace C:\logs\mytrace.log to the argument list " -s -f -o ":

strcURL = chr(34) & strCodeBase & "curl" & chr(34) & " -s -f --trace C:\logs\mytrace.log -o "

The -o switch takes another argument (the location of the output file), which is why the --trace switch and its argument comes before it

Mathias R. Jessen
  • 25,161
  • 4
  • 63
  • 95
  • Thanks Mathias! but i do not want this file overwritten every time this function is called, i would like to rotate or append it for each call, can you help me do this ? – user1452414 Jan 29 '15 at 12:51