Pode icon indicating copy to clipboard operation
Pode copied to clipboard

-UseRawItem on Add-PodeLogger

Open Badgerati opened this issue 3 years ago • 0 comments

When an item for Add-PodeLogger is just a plain string, a -UseRawItem would mean you don't need a pointless scriptblock that does the following:

New-PodeLoggingMethod -EventViewer | Add-PodeLogger -Name 'EventViewer' -ScriptBlock {
    param($item)
    return $item
}

Meaning it now becomes:

New-PodeLoggingMethod -EventViewer | Add-PodeLogger -Name 'EventViewer' -UseRawItem

Badgerati avatar Nov 29 '22 21:11 Badgerati