diff --git a/CHANGELOG.md b/CHANGELOG.md
index f032ad6..d4ab4e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [1.1.0] Add -NoColor Switch Parameter
+
+### Added
+
+- `-NoColor` switch parameter to both `Read-ChocoLog` and `Get-ChocoLogEntry` functions
+- Module-level variable `$script:ChocoLogNoColor` to control formatter behavior
+- Colored output control in `ChocoLog.format.ps1xml` formatter
+- Documentation and examples for the new parameter
+
+### Fixed
+
+- Undefined `$bg` variable reference in the original formatter
+
## [1.0.1] Add Missing Fatal
### Fixes
diff --git a/ChocoLogParse/ChocoLog.format.ps1xml b/ChocoLogParse/ChocoLog.format.ps1xml
index f06d5ac..a37d7bf 100644
--- a/ChocoLogParse/ChocoLog.format.ps1xml
+++ b/ChocoLogParse/ChocoLog.format.ps1xml
@@ -36,12 +36,16 @@
- $style = if ($_.exitCode -eq 0) {
- $PSStyle.Foreground.White
+ if ($script:ChocoLogNoColor) {
+ [String]::Format("{0}", $_.exitCode)
} else {
- $PSStyle.Foreground.Yellow
+ $style = if ($_.exitCode -eq 0) {
+ $PSStyle.Foreground.White
+ } else {
+ $PSStyle.Foreground.Yellow
+ }
+ [String]::Format("{0}{1}{2}", $style, $_.exitCode, $PSStyle.Reset)
}
- [String]::Format("{0}{1}{2}", $bg, $_.exitCode, $PSStyle.Reset)
diff --git a/ChocoLogParse/ChocoLogParse.psd1 b/ChocoLogParse/ChocoLogParse.psd1
index 4812a53..dd3d00e 100644
--- a/ChocoLogParse/ChocoLogParse.psd1
+++ b/ChocoLogParse/ChocoLogParse.psd1
@@ -12,7 +12,7 @@
RootModule = 'ChocoLogParse.psm1'
# Version number of this module.
- ModuleVersion = '1.0.1'
+ ModuleVersion = '1.1.0'
# Supported PSEditions
# CompatiblePSEditions = @()
diff --git a/ChocoLogParse/ChocoLogParse.psm1 b/ChocoLogParse/ChocoLogParse.psm1
index 4403590..b11a811 100644
--- a/ChocoLogParse/ChocoLogParse.psm1
+++ b/ChocoLogParse/ChocoLogParse.psm1
@@ -10,6 +10,9 @@ foreach ($import in @($enums + $classes + $public )) {
}
}
+# Initialize module variable for color control (default to colored output)
+$script:ChocoLogNoColor = $false
+
# Add our custom formatter that needed classes first
$format = Join-Path -Path $PSScriptRoot -ChildPath 'ChocoLog.format.ps1xml'
Update-FormatData -PrependPath $format
diff --git a/ChocoLogParse/Public/Get-ChocoLogEntry.ps1 b/ChocoLogParse/Public/Get-ChocoLogEntry.ps1
index fd33bbd..66526dd 100644
--- a/ChocoLogParse/Public/Get-ChocoLogEntry.ps1
+++ b/ChocoLogParse/Public/Get-ChocoLogEntry.ps1
@@ -9,6 +9,10 @@
Get-ChocoLogEntry
Grabs the laste entry from the latest log
+.EXAMPLE
+ Get-ChocoLogEntry -NoColor
+
+ Grabs the latest entry from the latest log without colored output
.PARAMETER Report
This changes the output to be more friendly for reporting
.PARAMETER Path
@@ -20,6 +24,9 @@
The log4net pattern layout used to parse the log. It is very unlikely that you
need to supply this. The code expects pattern names: time, session, level, and
message.
+.PARAMETER NoColor
+ Disables colored output in the formatter. When specified, the output will be
+ displayed without ANSI color codes.
#>
function Get-ChocoLogEntry {
[CmdletBinding()]
@@ -36,7 +43,8 @@ function Get-ChocoLogEntry {
$Filter = 'chocolatey*.log',
[string]
$PatternLayout = '%date %thread [%-5level] - %message',
- [switch]$Report
+ [switch]$Report,
+ [switch]$NoColor
)
# ToDo:
# - Support searching for a cli entry
@@ -44,7 +52,7 @@ function Get-ChocoLogEntry {
# - Exit code
# - Filter to recent time to make sure we get the right one
- $entry = Read-ChocoLog -FileLimit 1 -Path $Path -Filter $Filter -PatternLayout $PatternLayout | Select-Object -Last 1
+ $entry = Read-ChocoLog -FileLimit 1 -Path $Path -Filter $Filter -PatternLayout $PatternLayout -NoColor:$NoColor | Select-Object -Last 1
if ($report) {
# Print out in a format that's useful for Chef logging
Write-Host ('Command: {0}' -F $entry.cli)
diff --git a/ChocoLogParse/Public/Read-ChocoLog.ps1 b/ChocoLogParse/Public/Read-ChocoLog.ps1
index 9db798d..0877617 100644
--- a/ChocoLogParse/Public/Read-ChocoLog.ps1
+++ b/ChocoLogParse/Public/Read-ChocoLog.ps1
@@ -12,6 +12,10 @@
Read-ChocoLog
This will read the latest Chocolatey.log on the machine.
+.EXAMPLE
+ Read-ChocoLog -NoColor
+
+ This will read the latest Chocolatey.log on the machine without colored output.
.PARAMETER Path
The log path you want to parse. This will default to the latest local log.
This can be a directory of logs.
@@ -23,13 +27,16 @@
The log4net pattern layout used to parse the log. It is very unlikely that you
need to supply this. The code expects pattern names: time, session, level, and
message.
+.PARAMETER NoColor
+ Disables colored output in the formatter. When specified, the output will be
+ displayed without ANSI color codes.
#>
function Read-ChocoLog {
# This makes PlatyPS sad.
[OutputType([System.Collections.Generic.List[ChocoLog]])]
param (
[ValidateScript({
- if (-Not ($_ | Test-Path) ) {
+ if (-not ($_ | Test-Path) ) {
throw "File or folder does not exist"
}
return $true
@@ -41,8 +48,14 @@ function Read-ChocoLog {
[String]
$Filter = 'chocolatey*.log',
[string]
- $PatternLayout = '%date %thread [%-5level] - %message'
+ $PatternLayout = '%date %thread [%-5level] - %message',
+ [switch]
+ $NoColor
)
+
+ # Set module-level variable to control coloring in formatter
+ $script:ChocoLogNoColor = $NoColor.IsPresent
+
$files = Get-Item -Path $Path
if ($files.PSIsContainer) {
$files = Get-ChildItem -Path $Path -Filter $Filter |
@@ -110,6 +123,7 @@ function Read-ChocoLog {
}
# Return the whole parsed object
- Write-Verbose "Returning results in desceding order. Count: $($parsed.Count)"
- $parsed.Values | Sort-Object -Descending Time
+ Write-Verbose "Returning results in descending order. Count: $($parsed.Count)"
+ $return = $parsed.Values | Sort-Object -Descending Time
+ return $return
}
diff --git a/docs/en-US/Get-ChocoLogEntry.md b/docs/en-US/Get-ChocoLogEntry.md
index cb95f4f..b0e3eb4 100644
--- a/docs/en-US/Get-ChocoLogEntry.md
+++ b/docs/en-US/Get-ChocoLogEntry.md
@@ -14,7 +14,7 @@ Defaults to last exection.
## SYNTAX
```
-Get-ChocoLogEntry [[-Path] ] [[-Filter] ] [[-PatternLayout] ] [-Report]
+Get-ChocoLogEntry [[-Path] ] [[-Filter] ] [[-PatternLayout] ] [-Report] [-NoColor]
[-ProgressAction ] []
```
@@ -99,6 +99,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
+### -NoColor
+Disables colored output in the formatter. When specified, the output will be
+displayed without ANSI color codes.
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: False
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### -ProgressAction
{{ Fill ProgressAction Description }}
diff --git a/docs/en-US/Read-ChocoLog.md b/docs/en-US/Read-ChocoLog.md
index 52309ae..2fca1c8 100644
--- a/docs/en-US/Read-ChocoLog.md
+++ b/docs/en-US/Read-ChocoLog.md
@@ -14,7 +14,7 @@ Parses a Chocolatey log into an object that is easier to search and filter.
```
Read-ChocoLog [[-Path] ] [[-FileLimit] ] [[-Filter] ] [[-PatternLayout] ]
- []
+ [-NoColor] []
```
## DESCRIPTION
@@ -100,6 +100,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
+### -NoColor
+Disables colored output in the formatter. When specified, the output will be
+displayed without ANSI color codes.
+
+```yaml
+Type: SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: False
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
diff --git a/requirements.psd1 b/requirements.psd1
index 7f1976f..6b94096 100644
--- a/requirements.psd1
+++ b/requirements.psd1
@@ -9,13 +9,13 @@
}
}
'psake' = @{
- Version = '4.9.0'
+ Version = '4.9.1'
}
'BuildHelpers' = @{
Version = '2.0.16'
}
'PowerShellBuild' = @{
- Version = '0.6.1'
+ Version = '0.7.3'
}
'PSScriptAnalyzer' = @{
Version = '1.19.1'
diff --git a/tests/ChocoLogParse.tests.ps1 b/tests/ChocoLogParse.tests.ps1
index 29ed390..e445ec1 100644
--- a/tests/ChocoLogParse.tests.ps1
+++ b/tests/ChocoLogParse.tests.ps1
@@ -1,5 +1,8 @@
# cSpell:ignore BHPS Ffoo Subkeys
BeforeDiscovery {
+ if ($null -eq $env:BHPSModuleManifest) {
+ .\build.ps1 -Task Init
+ }
$manifest = Import-PowerShellDataFile -Path $env:BHPSModuleManifest
$outputDir = Join-Path -Path $env:BHProjectPath -ChildPath 'Output'
$outputModDir = Join-Path -Path $outputDir -ChildPath $env:BHProjectName
@@ -14,8 +17,7 @@ BeforeDiscovery {
BeforeAll {
# Setup dummy data including things across multiple lines
- $folder = "TestDrive:\folder"
- New-Item -Path "TestDrive:\" -Name 'folder' -Type Directory -Force
+ $folder = Join-Path -Path $PSScriptRoot -ChildPath 'fixtures\folder'
$singleFile = "TestDrive:\test.log"
# Due to "files.trimTrailingWhitespace" vscode setting, I added some '.'s
# to the multiline examples
@@ -74,27 +76,6 @@ Chocolatey upgraded 0/1 packages.
2023-06-14 14:22:10,115 54321 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2023-06-14 14:22:10,117 54321 [DEBUG] - Exiting with 900
'@
- # Create 10 files with 2 random sessions
- 0..10 | ForEach-Object {
- $randID = Get-Random -Minimum 1000 -Maximum 99999
- $randID2 = $randID - 100
- Set-Content "TestDrive:\folder\chocolatey.$($_).log" -Value @"
-2023-06-14 14:22:09,411 $randId [DEBUG] - Ffoo
-2023-06-14 14:22:09,418 $randId [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
-2023-06-14 14:22:09,422 $randId [INFO ] - Upgrading the following packages:
-2023-06-14 14:22:09,423 $randId [INFO ] - zoom
-2023-06-14 14:22:09,423 $randId [INFO ] - By upgrading, you accept licenses for the packages.
-2023-06-14 14:22:10,107 $randId [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
- You must be smarter than the average bear...
-2023-06-14 14:22:10,113 $randId [WARN ] - .
-Chocolatey upgraded 0/1 packages.
- See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
-2023-06-14 14:22:10,115 $randId [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
-2023-06-14 14:22:10,117 $randId [DEBUG] - Exiting with 0
-2023-06-14 15:22:09,411 $randId2 [DEBUG] - Ffoo
-2023-06-14 15:22:10,117 $randId2 [DEBUG] - Exiting with 0
-"@
- }
}
Describe 'Read-ChocoLog' {
@@ -106,7 +87,7 @@ Describe 'Read-ChocoLog' {
Context 'For Single File' {
It 'Parses the correct number of sessions' {
- ($script:parsed).Count | Should -Be 3
+ ($script:parsed).Count | Should -Be 3
}
It 'Parses the correct number of lines per session' {
@@ -140,7 +121,9 @@ Describe 'Read-ChocoLog' {
}
It 'Parses the correct number of lines per session' {
+ $script:multiple.Count | Should -Be 2
$script:multiple[0].logs.Count | Should -Be 9
+ $script:multiple[1].logs.Count | Should -Be 2
}
}
}
@@ -153,7 +136,7 @@ Describe 'Get-ChocoLogEntry' {
Context 'For Single File' {
It 'Parses the correct number of sessions' {
- ($script:parsedEntry).Count | Should -Be 1
+ ($script:parsedEntry).Count | Should -Be 1
}
It 'Parses the correct number of lines per session' {
diff --git a/tests/fixtures/folder/chocolatey.00.log b/tests/fixtures/folder/chocolatey.00.log
new file mode 100644
index 0000000..ac1491b
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.00.log
@@ -0,0 +1,14 @@
+2023-06-14 13:22:09,411 20171 [DEBUG] - Ffoo
+2023-06-14 13:22:09,418 20171 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 13:22:09,422 20171 [INFO ] - Upgrading the following packages:
+2023-06-14 13:22:09,423 20171 [INFO ] - zoom
+2023-06-14 13:22:09,423 20171 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 13:22:10,107 20171 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 13:22:10,113 20171 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 13:22:10,115 20171 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 13:22:10,117 20171 [DEBUG] - Exiting with 0
+2023-06-14 14:10:09,411 20071 [DEBUG] - Ffoo
+2023-06-14 14:10:10,117 20071 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.01.log b/tests/fixtures/folder/chocolatey.01.log
new file mode 100644
index 0000000..6d5a56d
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.01.log
@@ -0,0 +1,14 @@
+2023-06-14 12:22:09,411 82710 [DEBUG] - Ffoo
+2023-06-14 12:22:09,418 82710 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 12:22:09,422 82710 [INFO ] - Upgrading the following packages:
+2023-06-14 12:22:09,423 82710 [INFO ] - zoom
+2023-06-14 12:22:09,423 82710 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 12:22:10,107 82710 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 12:22:10,113 82710 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 12:22:10,115 82710 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 12:22:10,117 82710 [DEBUG] - Exiting with 0
+2023-06-14 13:10:09,411 82610 [DEBUG] - Ffoo
+2023-06-14 13:10:10,117 82610 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.02.log b/tests/fixtures/folder/chocolatey.02.log
new file mode 100644
index 0000000..b6e6b5a
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.02.log
@@ -0,0 +1,14 @@
+2023-06-14 11:22:09,411 27936 [DEBUG] - Ffoo
+2023-06-14 11:22:09,418 27936 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 11:22:09,422 27936 [INFO ] - Upgrading the following packages:
+2023-06-14 11:22:09,423 27936 [INFO ] - zoom
+2023-06-14 11:22:09,423 27936 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 11:22:10,107 27936 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 11:22:10,113 27936 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 11:22:10,115 27936 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 11:22:10,117 27936 [DEBUG] - Exiting with 0
+2023-06-14 12:10:09,411 27836 [DEBUG] - Ffoo
+2023-06-14 12:10:10,117 27836 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.03.log b/tests/fixtures/folder/chocolatey.03.log
new file mode 100644
index 0000000..cc0f4fb
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.03.log
@@ -0,0 +1,14 @@
+2023-06-14 10:22:09,411 67323 [DEBUG] - Ffoo
+2023-06-14 10:22:09,418 67323 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 10:22:09,422 67323 [INFO ] - Upgrading the following packages:
+2023-06-14 10:22:09,423 67323 [INFO ] - zoom
+2023-06-14 10:22:09,423 67323 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 10:22:10,107 67323 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 10:22:10,113 67323 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 10:22:10,115 67323 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 10:22:10,117 67323 [DEBUG] - Exiting with 0
+2023-06-14 11:10:09,411 67223 [DEBUG] - Ffoo
+2023-06-14 11:10:10,117 67223 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.04.log b/tests/fixtures/folder/chocolatey.04.log
new file mode 100644
index 0000000..ba8ae03
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.04.log
@@ -0,0 +1,14 @@
+2023-06-14 09:22:09,411 21017 [DEBUG] - Ffoo
+2023-06-14 09:22:09,418 21017 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 09:22:09,422 21017 [INFO ] - Upgrading the following packages:
+2023-06-14 09:22:09,423 21017 [INFO ] - zoom
+2023-06-14 09:22:09,423 21017 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 09:22:10,107 21017 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 09:22:10,113 21017 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 09:22:10,115 21017 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 09:22:10,117 21017 [DEBUG] - Exiting with 0
+2023-06-14 10:10:09,411 20917 [DEBUG] - Ffoo
+2023-06-14 10:10:10,117 20917 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.05.log b/tests/fixtures/folder/chocolatey.05.log
new file mode 100644
index 0000000..5364db2
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.05.log
@@ -0,0 +1,14 @@
+2023-06-14 08:22:09,411 52383 [DEBUG] - Ffoo
+2023-06-14 08:22:09,418 52383 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 08:22:09,422 52383 [INFO ] - Upgrading the following packages:
+2023-06-14 08:22:09,423 52383 [INFO ] - zoom
+2023-06-14 08:22:09,423 52383 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 08:22:10,107 52383 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 08:22:10,113 52383 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 08:22:10,115 52383 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 08:22:10,117 52383 [DEBUG] - Exiting with 0
+2023-06-14 09:10:09,411 52283 [DEBUG] - Ffoo
+2023-06-14 09:10:10,117 52283 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.06.log b/tests/fixtures/folder/chocolatey.06.log
new file mode 100644
index 0000000..726646e
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.06.log
@@ -0,0 +1,14 @@
+2023-06-14 07:22:09,411 98421 [DEBUG] - Ffoo
+2023-06-14 07:22:09,418 98421 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 07:22:09,422 98421 [INFO ] - Upgrading the following packages:
+2023-06-14 07:22:09,423 98421 [INFO ] - zoom
+2023-06-14 07:22:09,423 98421 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 07:22:10,107 98421 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 07:22:10,113 98421 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 07:22:10,115 98421 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 07:22:10,117 98421 [DEBUG] - Exiting with 0
+2023-06-14 08:10:09,411 98321 [DEBUG] - Ffoo
+2023-06-14 08:10:10,117 98321 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.07.log b/tests/fixtures/folder/chocolatey.07.log
new file mode 100644
index 0000000..9310f59
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.07.log
@@ -0,0 +1,14 @@
+2023-06-14 06:22:09,411 16429 [DEBUG] - Ffoo
+2023-06-14 06:22:09,418 16429 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 06:22:09,422 16429 [INFO ] - Upgrading the following packages:
+2023-06-14 06:22:09,423 16429 [INFO ] - zoom
+2023-06-14 06:22:09,423 16429 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 06:22:10,107 16429 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 06:22:10,113 16429 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 06:22:10,115 16429 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 06:22:10,117 16429 [DEBUG] - Exiting with 0
+2023-06-14 07:10:09,411 16329 [DEBUG] - Ffoo
+2023-06-14 07:10:10,117 16329 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.08.log b/tests/fixtures/folder/chocolatey.08.log
new file mode 100644
index 0000000..c1b9d02
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.08.log
@@ -0,0 +1,14 @@
+2023-06-14 05:22:09,411 76814 [DEBUG] - Ffoo
+2023-06-14 05:22:09,418 76814 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 05:22:09,422 76814 [INFO ] - Upgrading the following packages:
+2023-06-14 05:22:09,423 76814 [INFO ] - zoom
+2023-06-14 05:22:09,423 76814 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 05:22:10,107 76814 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 05:22:10,113 76814 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 05:22:10,115 76814 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 05:22:10,117 76814 [DEBUG] - Exiting with 0
+2023-06-14 06:10:09,411 76714 [DEBUG] - Ffoo
+2023-06-14 06:10:10,117 76714 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.09.log b/tests/fixtures/folder/chocolatey.09.log
new file mode 100644
index 0000000..1fd115c
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.09.log
@@ -0,0 +1,14 @@
+2023-06-14 04:22:09,411 29587 [DEBUG] - Ffoo
+2023-06-14 04:22:09,418 29587 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 04:22:09,422 29587 [INFO ] - Upgrading the following packages:
+2023-06-14 04:22:09,423 29587 [INFO ] - zoom
+2023-06-14 04:22:09,423 29587 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 04:22:10,107 29587 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 04:22:10,113 29587 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 04:22:10,115 29587 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 04:22:10,117 29587 [DEBUG] - Exiting with 0
+2023-06-14 05:10:09,411 29487 [DEBUG] - Ffoo
+2023-06-14 05:10:10,117 29487 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.10.log b/tests/fixtures/folder/chocolatey.10.log
new file mode 100644
index 0000000..47456ac
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.10.log
@@ -0,0 +1,14 @@
+2023-06-14 03:22:09,411 87828 [DEBUG] - Ffoo
+2023-06-14 03:22:09,418 87828 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 03:22:09,422 87828 [INFO ] - Upgrading the following packages:
+2023-06-14 03:22:09,423 87828 [INFO ] - zoom
+2023-06-14 03:22:09,423 87828 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 03:22:10,107 87828 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 03:22:10,113 87828 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 03:22:10,115 87828 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 03:22:10,117 87828 [DEBUG] - Exiting with 0
+2023-06-14 04:10:09,411 87728 [DEBUG] - Ffoo
+2023-06-14 04:10:10,117 87728 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.11.log b/tests/fixtures/folder/chocolatey.11.log
new file mode 100644
index 0000000..328bd62
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.11.log
@@ -0,0 +1,14 @@
+2023-06-14 02:22:09,411 50839 [DEBUG] - Ffoo
+2023-06-14 02:22:09,418 50839 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 02:22:09,422 50839 [INFO ] - Upgrading the following packages:
+2023-06-14 02:22:09,423 50839 [INFO ] - zoom
+2023-06-14 02:22:09,423 50839 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 02:22:10,107 50839 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 02:22:10,113 50839 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 02:22:10,115 50839 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 02:22:10,117 50839 [DEBUG] - Exiting with 0
+2023-06-14 03:10:09,411 50739 [DEBUG] - Ffoo
+2023-06-14 03:10:10,117 50739 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.12.log b/tests/fixtures/folder/chocolatey.12.log
new file mode 100644
index 0000000..211af14
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.12.log
@@ -0,0 +1,14 @@
+2023-06-14 01:22:09,411 98949 [DEBUG] - Ffoo
+2023-06-14 01:22:09,418 98949 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 01:22:09,422 98949 [INFO ] - Upgrading the following packages:
+2023-06-14 01:22:09,423 98949 [INFO ] - zoom
+2023-06-14 01:22:09,423 98949 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 01:22:10,107 98949 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 01:22:10,113 98949 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 01:22:10,115 98949 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 01:22:10,117 98949 [DEBUG] - Exiting with 0
+2023-06-14 02:10:09,411 98849 [DEBUG] - Ffoo
+2023-06-14 02:10:10,117 98849 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.13.log b/tests/fixtures/folder/chocolatey.13.log
new file mode 100644
index 0000000..2c445ef
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.13.log
@@ -0,0 +1,14 @@
+2023-06-14 00:22:09,411 78111 [DEBUG] - Ffoo
+2023-06-14 00:22:09,418 78111 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-14 00:22:09,422 78111 [INFO ] - Upgrading the following packages:
+2023-06-14 00:22:09,423 78111 [INFO ] - zoom
+2023-06-14 00:22:09,423 78111 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-14 00:22:10,107 78111 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-14 00:22:10,113 78111 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-14 00:22:10,115 78111 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-14 00:22:10,117 78111 [DEBUG] - Exiting with 0
+2023-06-14 01:10:09,411 78011 [DEBUG] - Ffoo
+2023-06-14 01:10:10,117 78011 [DEBUG] - Exiting with 0
diff --git a/tests/fixtures/folder/chocolatey.14.log b/tests/fixtures/folder/chocolatey.14.log
new file mode 100644
index 0000000..3e57c47
--- /dev/null
+++ b/tests/fixtures/folder/chocolatey.14.log
@@ -0,0 +1,14 @@
+2023-06-13 23:22:09,411 6976 [DEBUG] - Ffoo
+2023-06-13 23:22:09,418 6976 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
+2023-06-13 23:22:09,422 6976 [INFO ] - Upgrading the following packages:
+2023-06-13 23:22:09,423 6976 [INFO ] - zoom
+2023-06-13 23:22:09,423 6976 [INFO ] - By upgrading, you accept licenses for the packages.
+2023-06-13 23:22:10,107 6976 [INFO ] - zoom v5.14.11.17466 is newer than the most recent.
+ You must be smarter than the average bear...
+2023-06-13 23:22:10,113 6976 [WARN ] - .
+Chocolatey upgraded 0/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+2023-06-13 23:22:10,115 6976 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
+2023-06-13 23:22:10,117 6976 [DEBUG] - Exiting with 0
+2023-06-14 00:10:09,411 6876 [DEBUG] - Ffoo
+2023-06-14 00:10:10,117 6876 [DEBUG] - Exiting with 0