could you add couple features to logging.

43 views
Skip to first unread message

Tommi Prami

unread,
Sep 29, 2025, 12:43:15 AMSep 29
to inno...@googlegroups.com
Hello,

I would need a couple new things for logging.

1. Possibility to set log file name (format) and path from script
2. Maybe there should be a way to set logging to memory, and maybe an event that woulöd 
fire at the end, and I could save it or not.
  - Don't know if this is smart or not, maybe if everything seems to be fine, could have a way to tell the installer to delete the log at shut down if not told otherwise.
3. If not already, make the current log file name public. I could not find any way I could get the name of the file. So I could copy it at the end of the installation to place of my liking.

For 2. My idea is that at the end of the installer I could do some sanity checks and if something seems fishy, there would be log available afterwards. Now we had massive weirdness at a couple customer installations, and have no way to know what happened because the initial state is gone, and we can't reproduce the error. 

To me, as a coder not knowing the internals of Inno Setup, those seem quite simple changes. Might be wildly wrong.

-tee-


Gavin Lambert

unread,
Sep 29, 2025, 1:54:59 AMSep 29
to innosetup
On Monday, September 29, 2025 at 5:43:15 PM UTC+13 Tommi Prami wrote:
1. Possibility to set log file name (format) and path from script
2. Maybe there should be a way to set logging to memory, and maybe an event that woulöd 
fire at the end, and I could save it or not.
  - Don't know if this is smart or not, maybe if everything seems to be fine, could have a way to tell the installer to delete the log at shut down if not told otherwise.
3. If not already, make the current log file name public. I could not find any way I could get the name of the file. So I could copy it at the end of the installation to place of my liking.

SetupLogging can be used to enable the log file, and {log} can be used to get its name.  You can't choose its location or name, but you can copy it elsewhere e.g. in DeinitializeSetup if you wish.  Bear in mind that {app} might not exist if the installation failed or was cancelled, so you'll have to behave accordingly. 

Andrew Truckle

unread,
Oct 6, 2025, 12:19:57 AM (9 days ago) Oct 6
to innosetup
Yes, I already do this. Duplicate the log to my own desired folder. The question was discussed and answered with sample code on stack overflow. 

Andrew

Reply all
Reply to author
Forward
0 new messages