functions/logging/Get-PSFLoggingProvider.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function Get-PSFLoggingProvider
{
<#
    .SYNOPSIS
        Returns a list of the registered logging providers.
     
    .DESCRIPTION
        Returns a list of the registered logging providers.
        Those are used to log messages to whatever system they are designed to log to.
     
        PSFramework ships with a few default logging providers.
        Custom logging destinations can be created by implementing your own, custom provider and registering it using Register-PSFLoggingProvider.
     
    .PARAMETER Name
        Default: '*'
        The name to filter by
     
    .EXAMPLE
        PS C:\> Get-PSFLoggingProvider
     
        Returns all logging provider
     
    .EXAMPLE
        PS C:\> Get-PSFLoggingProvider -Name filesystem
     
        Returns the filesystem provider
#>

    [CmdletBinding()]
    Param (
        [Alias('Provider', 'ProviderName')]
        [string]
        $Name = "*"
    )
    
    begin
    {
        
    }
    process
    {
        [PSFramework.Logging.ProviderHost]::Providers.Values | Where-Object Name -Like $Name
    }
    end
    {
    
    }
}