-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
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 @paramSetPSFLoggingProviderThis 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.