|
Rank: Member
Joined: 3/6/2018 Posts: 28
|
Hi all,
I am using as-file(stderr(failed-step())) to log error in error.log file. Its logging the error but I want to add datetime as well in the log file. Can you please help me with this. Please find attached steps I am using to cretae errorlog
Thanks
rautr attached the following image(s):
|
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 564
|
Well, generally speaking, you'll need to use the command-line function appropriate to the host operating system to get the datetime value as a string, then concatenate that with the string contents of your stderr in order to save the concatenated string as a file.
Have you tried going down that path?
|
|
Rank: Member
Joined: 3/6/2018 Posts: 28
|
K101 wrote:Well, generally speaking, you'll need to use the command-line function appropriate to the host operating system to get the datetime value as a string, then concatenate that with the string contents of your stderr in order to save the concatenated string as a file.
Have you tried going down that path?
Thanks a lot. I am using echo %DATE% Shell Command-line and concatenating the result to actual step result to add in file.
|
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 564
|
rautr wrote:I am using echo %DATE% Shell Command-line and concatenating the result to actual step result to add in file.
When you put it that way it sounds like you already have it working. Is that accurate?
|
|
Rank: Member
Joined: 3/6/2018 Posts: 28
|
K101 wrote:rautr wrote:I am using echo %DATE% Shell Command-line and concatenating the result to actual step result to add in file. When you put it that way it sounds like you already have it working. Is that accurate?
echo %DATE% %Time% , Yes its working fine
|
|
guest |