Announcement

Collapse
No announcement yet.

Setting the logfile name

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting the logfile name

    I'd like to reset the logfile name. It needs to be done at the earliest opportunity to prevent multiple logs.

    Where is the best place to do this?


  • #2
    The setup log file is defined here:

    Click image for larger version

Name:	SCRN-2020-12-01-01.png
Views:	66
Size:	43.2 KB
ID:	305820

    The uninstaller log file is set here:

    Click image for larger version

Name:	SCRN-2020-12-01-02.png
Views:	57
Size:	15.4 KB
ID:	305821

    Ulrich

    Comment


    • #3
      Hi Ulrich,

      I appreciate this is where the log file filename can be set. However, I would to know if it can be changed / set else where e.g. at the top of On Startup.

      What I would like to do is change this name based on the %LaunchUserDomain%. If it matches our cloud's domain locate the log file where the installer was launched otherwise maintain the status quo.

      Clive

      Comment


      • #4
        You cannot change the location of the logfile at runtime. Even if you use a session variable to define the path to the log file, afther changing the contents of the session variable in the On Startup event, the log will still continue to be written to the original path, when the file handle was opened.

        Perhaps you could write the log file locally, as usual. In the On Shutdown event script, you can copy or append the current log to the cloud if needed. It will not save the full log (the setup will still be running and may not have flushed all the log entries to the disk), but it could be enough for your needs...

        Ulrich

        Comment


        • #5
          Thanks Ulrich. That suggestion sounds like a pretty good idea.

          Comment

          Working...
          X