How to use the @salesforce/command.core.Logger function in @salesforce/command

To help you get started, we’ve selected a few @salesforce/command examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amtrack / sfdx-browserforce-plugin / src / commands / browserforce / apply.ts View on Github external
public async run(): Promise {
    const logger = await core.Logger.root();
    this.ux.log(
      `Applying plan file ${
        this.flags.definitionfile
      } to org ${this.org.getUsername()}`
    );
    for (const setting of this.settings) {
      const driver = setting.Driver.default;
      const instance = new driver(this.bf, this.org);
      this.ux.startSpinner(`[${driver.name}] retrieving state`);
      let state;
      try {
        state = await instance.retrieve(setting.value);
      } catch (err) {
        this.ux.stopSpinner('failed');
        throw err;
      }