Skip to content

Commit

Permalink
duct tape Merge-LogPref
Browse files Browse the repository at this point in the history
  • Loading branch information
hobointhecorner committed Dec 15, 2021
1 parent 368913a commit 55468ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions Hobo.Log.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ function Merge-LogPref
[cmdletbinding()]
param(
[parameter(Mandatory)]
[hashtable]$NewPref,
[hashtable]$Pref,

[parameter(Mandatory)]
[hashtable]$Pref
[hashtable]$NewPref = @{}
)

process
{
foreach ($key in $NewPref.Keys)
if ($NewPref.Keys)
{
if ($Pref.ContainsKey($key))
{
$Pref[$key] = $NewPref[$key]
}
else
foreach ($key in $NewPref.Keys)
{
$Pref.Add($key, $NewPref[$key])
if ($Pref.ContainsKey($key))
{
$Pref[$key] = $NewPref[$key]
}
else
{
$Pref.Add($key, $NewPref[$key])
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/Hobo.Log.Event/Hobo.Log.Event.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $disabledLogSources = @()

if ($IsLinux)
{
Write-Warning "Disabling event logging: platform is Non-Windows"
Write-Verbose "Disabling event logging: platform is Non-Windows"
$isEnabled = $false
}

Expand Down

0 comments on commit 55468ab

Please sign in to comment.