curl-users
RE: How to Log Error Message From
Date: Tue, 9 Jan 2007 16:57:42 -0600
At least in a UNIX script, the return code of the last command executed
(curl or any other command) is temporarily available via the questions
mark (?). Therefore immediately after a curl command I code the
following.
"curlrc=$?"
This puts the value of the curl return code in my variable "curlrc" that
I can then store in a log file. There should be something similar in
perl. Hope this helps.
Good Luck.
-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Mahesh Ramamurthy
Sent: Tuesday, January 09, 2007 3:43 PM
To: curl-users_at_cool.haxx.se
Subject: How to Log Error Message From
Hi All,
I have curl set up and using it in a perl script and things are
working fine. What I would like to know is if we can log the error
messages given out by CURL.
For ex when I give an invalid URL this error message is printed to the
screen.
curl: (56) Received HTTP code 502 from proxy after CONNECT.
I would like to know if I can capture this and write to a log file.
Thanks in advance.
Mahesh
-- Dream as if you'll live forever. Live as if you'll die today.Received on 2007-01-10