Dynamic log location in v4

Hi,
I hope this is the right category! :slight_smile:

I have recently started testing the new psadt and i am missing one feature with the new psadt: dynamic log locations.

In v3, I could edit the xml config file, and in the log location i could just put “$logdir” which i would fill in my deploy-application.ps1. I used this only to append the application name to the directory path, so I had all logs (PSADT, MSI and otherwise) for the deployment in one location without such a mess. Especially on Test-Systems, which have go through maybe 50 or 60 deployments.

Example:
In AppDeployToolkit.xml:
<Toolkit_LogPath>$logDir</Toolkit_LogPath>
in Deploy-Application.ps1:
$logdir=“C:\windows\logs\software$appname”

Now, with the new .psd1-Config-File, this is no longer possible, since there can be no variables in .psd1-Files (as far as i can tell and gather from the error messages?)

Is there a built-in way i am not seeing to do this with the new psadt?

Thanks in advance for all the help!

That undocumented at this time but you can read about how to do it here

I think you might have got the link mixed up :sweat_smile:

@S3LM4K, you want the LogToSubfolder option: PSAppDeployToolkit/src/PSAppDeployToolkit/Config/config.psd1 at 79684ff4fe1c19ead59086c941f449d82501df18 · PSAppDeployToolkit/PSAppDeployToolkit · GitHub

I meant this link

Mitch: Some of these logging trick need to be documented.

Agreed. I’ll see about getting the documents updated on the weekend.

It’s actually documented to some degree, it can be seen here: Open-ADTSession · PSAppDeployToolkit. The configuration’s LogToSubfolder option is going to be preferable for the OP, though.