@@ -18,6 +18,7 @@ import { MigrationResult, MigrationTool } from '../../../migration/interfaces';
1818import { ResultsBuilder } from '../../../utils/resultsbuilder' ;
1919import { CardMigrationTool } from '../../../migration/flexcard' ;
2020import { OmniScriptExportType , OmniScriptMigrationTool } from '../../../migration/omniscript' ;
21+ import { Logger } from '../../../utils/logger' ;
2122
2223// Initialize Messages with the current plugin directory
2324Messages . importMessagesDirectory ( __dirname ) ;
@@ -48,14 +49,15 @@ export default class Migrate extends OmniStudioBaseCommand {
4849 required : false ,
4950 } ) ,
5051 } ;
52+ private logger : Logger ;
5153
5254 // eslint-disable-next-line @typescript-eslint/no-explicit-any
5355 public async run ( ) : Promise < any > {
5456 const namespace = ( this . flags . namespace || 'vlocity_ins' ) as string ;
5557 const apiVersion = ( this . flags . apiversion || '55.0' ) as string ;
5658 const migrateOnly = ( this . flags . only || '' ) as string ;
5759 const allVersions = this . flags . allversions || false ;
58-
60+ this . logger = new Logger ( this . ux , this . logger ) ;
5961 // this.org is guaranteed because requiresUsername=true, as opposed to supportsUsername
6062 const conn = this . org . getConnection ( ) ;
6163 conn . setApiVersion ( apiVersion ) ;
@@ -126,7 +128,7 @@ export default class Migrate extends OmniStudioBaseCommand {
126128 let allTruncateComplete = true ;
127129 for ( const cls of migrationObjects . reverse ( ) ) {
128130 try {
129- this . ux . log ( 'Cleaning: ' + cls . getName ( ) ) ;
131+ this . logger . log ( 'Cleaning: ' + cls . getName ( ) ) ;
130132 debugTimer . lap ( 'Cleaning: ' + cls . getName ( ) ) ;
131133 await cls . truncate ( ) ;
132134 } catch ( ex : any ) {
0 commit comments