Skip to content

Commit

Permalink
Merge pull request #558 from mountaindude/522
Browse files Browse the repository at this point in the history
Enhance logging for app replacement in scrambleField function
  • Loading branch information
mountaindude authored Nov 26, 2024
2 parents dc039ba + 2567249 commit 33450a4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/cmd/qseow/scramblefield.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,19 @@ export async function scrambleField(options) {
resultReplace = await replaceApp(newAppId, options.newAppCmdId, options);
scrambleResult.status = 'success';
}

if (resultReplace) {
logger.info(
`Replaced existing app "${options.newAppCmdId}" with new, scrambled app "${options.newAppName}" (app ID: ${newAppId})`
);
scrambleResult.cmdDone = 'replace';
scrambleResult.status = 'success';
} else {
logger.error(
`Error replacing existing app "${options.newAppCmdName}" with new, scrambled app "${options.newAppName}"`
);
scrambleResult.status = 'error';
}
} else if (options.newAppCmdName) {
// Replace by app name
// First look up app ID by name
Expand Down

0 comments on commit 33450a4

Please sign in to comment.