I’ve configured logging as shown below and the results are confusing. My goal is system logging at error level going to a file, and user logging for API at information level going to a file. The code below produces neither result. The directory exists. I still see system logging going to the original ProgramData directory. I see no API logging at all any longer.
New-PSULoggingTarget -Type “File” -Level “Error” -Properties @{
path = ‘E:\PULogs\system.log’
} -Scope “System”
New-PSULoggingTarget -Type “File” -Level “Information” -Feature “API” -Properties @{
path = ‘E:\PULogs\api.log’
} -Scope “User”
Product: PowerShell Universal
Version: 4.1.7