Not sure which version this started happening, but if you do something like
$paramSetPSFLoggingProvider = @{
Name = "logfile"
FilePath = "$PSScriptRoot\logs\%Date%.csv"
LogRotatePath = "$PSScriptRoot\logs\*.csv"
Enabled = $true
}
Set-PSFLoggingProvider @paramSetPSFLoggingProvider
This will end up creating a log file even if nothing is ever written.
For cases where it's common that nothing happens for most days, it's a bit annoying to have a ton of log files even though just some actually may contains something.
So if possible it would be nice if the files are only created when something is actually written to it.
Not sure which version this started happening, but if you do something like
This will end up creating a log file even if nothing is ever written.
For cases where it's common that nothing happens for most days, it's a bit annoying to have a ton of log files even though just some actually may contains something.
So if possible it would be nice if the files are only created when something is actually written to it.