Skip to content

Commit

Permalink
Changed to verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
lexiismadd committed Nov 23, 2022
1 parent 98b995a commit 69993fd
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions Standard-CT-Module/CT-PS-Standard.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,10 @@ Function Write-Transcript {
[CmdletBinding()]
Param(
[Parameter(ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True)]
$output,
[Parameter(ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True)]
[switch] $NoNewLine
$output
)
if (Get-Variable VerboseOut -Scope Global -ValueOnly) {
if ($NoNewLine) {
Write-Host "$($output)" -NoNewline
} else {
Write-Host "$($output)"
}
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
Write-Verbose "$($output)"
}
$output | Out-File -FilePath "$($Transcript_log)" -Append
}
Expand All @@ -140,16 +134,10 @@ Function Write-API-Log {
[CmdletBinding()]
Param(
[Parameter(ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True)]
$output,
[Parameter(ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True)]
[switch] $NoNewLine
$output
)
if (Get-Variable VerboseOut -Scope Global -ValueOnly) {
if ($NoNewLine) {
Write-Host "$($output)" -NoNewline
} else {
Write-Host "$($output)"
}
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
Write-Verbose "$($output)"
}
$output | Out-File -FilePath "$($API_log)" -Append
}
Expand Down

0 comments on commit 69993fd

Please sign in to comment.