My script runs a setup.ps1 script that gets a lot of general/config settings.
Among those, setup.ps1 assigns $logFile to be basically $myinvovation.mycommand.name.replace('.ps1','.log') so that the log file is the same as the script with a log extension.
In my main script, I wish to do the same - write a log for any information I want to keep track of. But I suspect, it will overwrite my $logFile variable - is that accurate?
If so, I assume my only option is to simply use another variable, correct?
Or I'm thinking about keeping one log file, but in my function to write to it, precede the data text with the source script name.