cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
rakesh_dama
Active participant

How to get timestamp against log of each step in install anywhere

Hi,

I would like to get the timestamp against each step in log file. is there a way to do that in Install Anywhere ?

For example: 

14:32:43 Starting - Generating Readme...
14:32:43 Starting - Sending Notification...
14:32:43 Starting - Copy Log Files to Server...
14:32:44 Starting - Validating Status...

Thanks,

Rakesh Dama.

Tags (1)
0 Kudos
9 Replies
Flexera Flexera_Ian
Flexera

Re: How to get timestamp against log of each step in install anywhere

Hi Rakesh,

Thank you for your post.

If you are using InstallAnywhere 2017 or higher, you could try navigating to Project > General Settings > Log Settings, setting Enable Logging to Yes, checking the Install checkbox, setting Include timestamp to Yes, building your project, then running your installer. Your installer should generate a standard install log that includes timestamps.

Thanks,

Ian

rakesh_dama
Active participant

Re: How to get timestamp against log of each step in install anywhere

Hi Ian,

I tried this. 

It's not reporting anything. Can you see any issue here ?

ia_logsettings.png

 

Thanks.

0 Kudos
rakesh_dama
Active participant

Re: How to get timestamp against log of each step in install anywhere

And, another problem is, Seems like it is looking only if IA is able to execute that resource or not. not the status or return code of that resource.

if I put execute script module in installer, though my script fails, it prints installer status as SUCCESS.

0 Kudos
Flexera Flexera_Ian
Flexera

Re: How to get timestamp against log of each step in install anywhere

Hi Rakesh,

Thank you for your reply.

As a test, could you please click the blue arrow pointing to the left button to revert the log location to the default, rebuild your project, then retest this issue?

Please make sure to check the standard install log under $USER_INSTALL_DIR$$\$_$PRODUCT_NAME$_installation$\$Logs$/$ not installer_log.txt. Are you checking installer_log.txt? Or the standard install log?

Thanks,

Ian

0 Kudos
Flexera Flexera_Ian
Flexera

Re: How to get timestamp against log of each step in install anywhere

Hi Rakesh,

Thank you for your reply.

I believe that is expected behavior. The installer reports SUCCESS because the action reports SUCCESS because the action executed, as you mentioned.

If you're using an Execute Script/Batch file Action, as long as you have the Suspend installation until process completes checkbox checked, you could try checking the InstallAnywhere variable to stores the action's exit code. Please give that a try. Does that work for you?

Thanks,

Ian

0 Kudos
rakesh_dama
Active participant

Re: How to get timestamp against log of each step in install anywhere

That stdout and stderr log, I could not write into the log file that is getting generated by IA with timestamp.

 

By the way can you take a look at abve log settings. and tell if there is a gap.

0 Kudos
Flexera Flexera_Ian
Flexera

Re: How to get timestamp against log of each step in install anywhere

So you're saying that the standard install log does have timestamps when you generate it?

Would being able to write a custom error to the standard install log allow you to use that log for timestamps?

I don't believe that the non-standard install log installer_log.txt has timestamps, only the standard install log.

You're missing $ dollar sign characters.

I believe it should be:

$LOG_DIR_LINUX$$/$$Version$$/$

if both $LOG_DIR_LINUX$ and $Version$ are InstallAnywhere variables. $/$ is a platform-neutral InstallAnywhere variable that resolves to \ or / depending on the operating system.

If only $LOG_DIR_LINUX$ is an InstallAnywhere variable, not Version, then it would be:

$LOG_DIR_LINUX$$/$Version$/$

instead.

You need $ dollar signs for the InstallAnywhere variables and $ dollar signs for the / to be resolved to / or \ depending on the operating system.

Please give that a try. Does that work for you?

0 Kudos
rakesh_dama
Active participant

Re: How to get timestamp against log of each step in install anywhere

Thanks Ian.

$LOG_DIR_LINUX$$/$$Version$$/$ can be "$LOG_DIR_LINUX$/$Version$/" if it is targeted for Linux OS. As per the document we should mark slashes in dollar, if we target OS agnostic installer(multi platform).

But, yeah, better to have $/$, as you suggested.

I vaguely remember that:

If we use $USER_HOME$ or tmp or some standard locations, it is generating log file with timestamps. But, if I use custom IA variable for log location, I don't think it is generating standard logs there. I still have to re-verify this.

0 Kudos
Flexera Flexera_Ian
Flexera

Re: How to get timestamp against log of each step in install anywhere

You're welcome, Rakesh.

I do not believe that InstallAnywhere supports using a custom InstallAnywhere variable in the log location.

0 Kudos