I am running an automated install of webservice on server, creating user, creating site for the service, creating app pool etc.
I would like to write out errors to a log file, I’ve found out that “2>>” after each line gets me any errors! But how can I write a line before each errormessage just to categorize from which action the errormsg comes from?
I’m not that keen on dos cmd’s so any help is appriciated!
Thanks in advance, Finn.
Posting an outline of your script would be helpful.
Assuming the script looks something like this:
you could modify it like this:
That is, if I understood your intention correctly, of course.
DATEandTIMEin this case are system environment variables. They are evaluated to the current system date and time respectively. You can omit them, of course. I just thought they wouldn’t harm if used with logging.