Skip to content

Commit

Permalink
Invoke-DbaDbDataMasking - Use correct logging command (#9117)
Browse files Browse the repository at this point in the history
Co-authored-by: Chrissy LeMaire <[email protected]>
  • Loading branch information
andreasjordan and potatoqualitee authored Oct 10, 2023
1 parent 166663b commit a2e11f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/Invoke-DbaDbDataMasking.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ function Invoke-DbaDbDataMasking {
$null = $server.Databases['tempdb'].Query($insertQuery)
$insertFailed = $false
} catch {
Write-PSFMessage -Level Verbose -Message "Could not insert value"
Write-Message -Level Verbose -Message "Could not insert value"
$insertFailed = $true
}

Expand Down Expand Up @@ -702,7 +702,7 @@ function Invoke-DbaDbDataMasking {
$null = $server.Databases['tempdb'].Query($insertQuery)
$insertFailed = $false
} catch {
Write-PSFMessage -Level Verbose -Message "Could not insert value"
Write-Message -Level Verbose -Message "Could not insert value"
$insertFailed = $true
$retryCount++
}
Expand All @@ -717,7 +717,7 @@ function Invoke-DbaDbDataMasking {
Stop-Function -Message "Could not add masking index for [$($indexToTable.TempTableName)]" -ErrorRecord $_
}
} else {
Write-PSFMessage -Level Verbose -Message "Table [$($tableobject.Schema)].[$($tableobject.Name)] does not contain any masking index columns to process"
Write-Message -Level Verbose -Message "Table [$($tableobject.Schema)].[$($tableobject.Name)] does not contain any masking index columns to process"
}
} else {
Stop-Function -Message "The table does not have any indexes"
Expand Down Expand Up @@ -776,7 +776,7 @@ function Invoke-DbaDbDataMasking {
$newValue = $columnobject.StaticValue

if ($null -eq $newValue -and -not $columnobject.Nullable) {
Write-PSFMessage -Message "Column '$($columnobject.Name)' static value cannot null when column is set not to be nullable."
Write-Message -Message "Column '$($columnobject.Name)' static value cannot null when column is set not to be nullable."
} else {
try {
$convertedValue = Convert-DbaMaskingValue -Value $newValue -DataType $columnobject.ColumnType -Nullable:$columnobject.Nullable -EnableException
Expand Down

0 comments on commit a2e11f9

Please sign in to comment.