Themuppeteer
Programmer
Hello,
I have a program that executes commands. If a command does not work, I want it to be logged. So I do something like this: ./myprog 2>> /var/log/messages
Which works fine, except for the fact that I want the log message to be more complete then 'could not connect' (the error that the program produces). I would like it to be something like: "myprogram: 14.22 could not connect"
How do I do this ? I know I should cat the error with the time and name but I don't know how.
Can NE1 help me?
thnx.
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
"Those who say they understand chess, understand nothing"
-- Robert HUBNER
I have a program that executes commands. If a command does not work, I want it to be logged. So I do something like this: ./myprog 2>> /var/log/messages
Which works fine, except for the fact that I want the log message to be more complete then 'could not connect' (the error that the program produces). I would like it to be something like: "myprogram: 14.22 could not connect"
How do I do this ? I know I should cat the error with the time and name but I don't know how.
Can NE1 help me?
thnx.
Greetz,

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
"Those who say they understand chess, understand nothing"
-- Robert HUBNER