Hi ,
I want to print the timstamp at every point of the script , I am trying to use new Date() module at different parts of script , but only last line of newdate is printed,
Hey there!
Would you mind sharing the script with me here so that I can take a look at it? You should be able to create a timestamp and log it out using the below method:
def now = new Date()
//Make sure to set change CST to your timezone
log.debug(now.format("yyyyMMdd-HH:mm:ss.SSS", TimeZone.getTimeZone('CST')))
P.S. you may have to change your logging level in order to see this logging statement. You can also try logging statements like:
log.info()
log.error()
log.warn()
Best,
Aidan
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.