Write-Log
SYNOPSIS
Writes something to Log
SYNTAX
Write-Log [-Log] <String> [-Severity] <String> [-Message] <String> [[-Duration] <Object>] [<CommonParameters>]
DESCRIPTION
standardized way to log to Screen, File and Elastic
EXAMPLES
Example 1
{{ Add example description here }}
PARAMETERS
-Log
Options are: Output => log to screen Verbose => log verbose info Debug => log debug info \<filepath> => log to file \<server/ip:port> => log to host/ip:port
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Severity
Severity level for the log
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Message
The actual Log message
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Duration
only used for logging to host/ip send duration info
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
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.