{"action":"created","issue":{"url":"https://api.github.com/repos/EsOsO/Logging/issues/7","repository_url":"https://api.github.com/repos/EsOsO/Logging","labels_url":"https://api.github.com/repos/EsOsO/Logging/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/EsOsO/Logging/issues/7/comments","events_url":"https://api.github.com/repos/EsOsO/Logging/issues/7/events","html_url":"https://github.com/EsOsO/Logging/issues/7","id":193893949,"number":7,"title":"Error when running sample code from TL;DR","user":{"login":"cparker4486","id":1189638,"avatar_url":"https://avatars.githubusercontent.com/u/1189638?v=3","gravatar_id":"","url":"https://api.github.com/users/cparker4486","html_url":"https://github.com/cparker4486","followers_url":"https://api.github.com/users/cparker4486/followers","following_url":"https://api.github.com/users/cparker4486/following{/other_user}","gists_url":"https://api.github.com/users/cparker4486/gists{/gist_id}","starred_url":"https://api.github.com/users/cparker4486/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cparker4486/subscriptions","organizations_url":"https://api.github.com/users/cparker4486/orgs","repos_url":"https://api.github.com/users/cparker4486/repos","events_url":"https://api.github.com/users/cparker4486/events{/privacy}","received_events_url":"https://api.github.com/users/cparker4486/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-06T21:44:44Z","updated_at":"2016-12-12T22:20:07Z","closed_at":null,"body":"Hello,\r\n\r\nTrying to use the TL;DR from Logging.psd1 results in some errors. First the code being run:\r\n\r\n```\r\nSet-LoggingDefaultLevel -Level 'WARNING'\r\nAdd-LoggingTarget -Name Console\r\nAdd-LoggingTarget -Name File -Configuration @{Path = 'C:\\my\\path\\example_%{+%Y%m%d}.log'}\r\n\r\n$Level = 'DEBUG', 'INFO', 'WARNING', 'ERROR'\r\nforeach ($i in 1..100) {\r\n    Write-Log -Level ($Level | Get-Random) ('Message n.{0}' -f $i)\r\n    Start-Sleep -Milliseconds (Get-Random -Min 100 -Max 1000)\r\n}\r\n\r\nWait-Logging        # See Note\r\n```\r\n\r\nAnd the errors:\r\n\r\n```\r\nNew-Object : Exception calling \".ctor\" with \"1\" argument(s): \"Cannot process argument because the value of argument \r\n\"validValues\" is out of range. Change argument \"validValues\" to  a value that is within range.\r\nParameter name: validValues\r\nActual value was System.String[].\"\r\nAt C:\\Users\\<user>\\OneDrive - <tenant>\\WindowsPowerShell\\Modules\\Logging\\Logging.psm1:307 char:33\r\n+ ... Attribute = New-Object System.Management.Automation.ValidateSetAttrib ...\r\n+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException\r\n    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand\r\n \r\nNew-Object : Exception calling \".ctor\" with \"1\" argument(s): \"Cannot process argument because the value of argument \r\n\"validValues\" is out of range. Change argument \"validValues\" to  a value that is within range.\r\nParameter name: validValues\r\nActual value was System.String[].\"\r\nAt C:\\Users\\<user>\\OneDrive - <tenant>\\WindowsPowerShell\\Modules\\Logging\\Logging.psm1:307 char:33\r\n+ ... Attribute = New-Object System.Management.Automation.ValidateSetAttrib ...\r\n+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException\r\n    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand\r\n \r\nCannot index into a null array.\r\nAt C:\\Users\\<user>\\OneDrive - <tenant>\\WindowsPowerShell\\Modules\\Logging\\Logging.psm1:290 char:13\r\n+         if ($TargetConf.Configuration[$Conf] -and $Configuration[$Con ...\r\n+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException\r\n    + FullyQualifiedErrorId : NullArray\r\n```"},"comment":{"url":"https://api.github.com/repos/EsOsO/Logging/issues/comments/266571423","html_url":"https://github.com/EsOsO/Logging/issues/7#issuecomment-266571423","issue_url":"https://api.github.com/repos/EsOsO/Logging/issues/7","id":266571423,"user":{"login":"cparker4486","id":1189638,"avatar_url":"https://avatars.githubusercontent.com/u/1189638?v=3","gravatar_id":"","url":"https://api.github.com/users/cparker4486","html_url":"https://github.com/cparker4486","followers_url":"https://api.github.com/users/cparker4486/followers","following_url":"https://api.github.com/users/cparker4486/following{/other_user}","gists_url":"https://api.github.com/users/cparker4486/gists{/gist_id}","starred_url":"https://api.github.com/users/cparker4486/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cparker4486/subscriptions","organizations_url":"https://api.github.com/users/cparker4486/orgs","repos_url":"https://api.github.com/users/cparker4486/repos","events_url":"https://api.github.com/users/cparker4486/events{/privacy}","received_events_url":"https://api.github.com/users/cparker4486/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T22:20:07Z","updated_at":"2016-12-12T22:20:07Z","body":"@EsOsO I've tried on two other computers. One with Windows 10 LTSB and one Server 2012 R2. Same result in both places. Here's $PSVersionTable from the latter computer.\r\n\r\n```\r\nName                           Value\r\n----                           -----\r\nPSVersion                      5.0.10586.117\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion                   10.0.10586.117\r\nCLRVersion                     4.0.30319.42000\r\nWSManStackVersion              3.0\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\n\r\n```"}}
{"actor":{"display_login":"cparker4486"}}