How to use the @zowe/imperative.Logger.getAppLogger function in @zowe/imperative

To help you get started, we’ve selected a few @zowe/imperative 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 IBM / zowe-cli-cics-deploy-plugin / src / api / BundleContent / AutoBundler.ts View on Github external
}
      }
    }

    // Add the NODEJSAPP to the Bundle
    this.bundle.addNodejsappDefinition(njappname, fullSS, this.portOverride);
    try {
      // Construct an info message to report that the NODEJSAPP has been created
      const msg = '    define : NODEJSAPP "' + njappname + '" with startscript "' + ss + '"';

      // log the message to the console for the uesr
      params.response.console.log(msg);

      // Also log the message for posterity
      if (params.arguments.silent === undefined) {
        const logger = Logger.getAppLogger();
        logger.debug(msg);
      }
    }
    catch (error) {
      // logging errors can be thrown in some of the mocked tests... just ignore it.
    }
  }
github IBM / zowe-cli-cics-deploy-plugin / src / api / BundleContent / AutoBundler.ts View on Github external
}
    else {
      // If we get here then we've not found a package.json file. it remains possible
      // that sufficient command line parameters have been set to allow a NODEJSAPP
      // to be created. If so, process them.
      if (this.startscriptOverride !== undefined ||
          this.nodejsappOverride   !== undefined ||
          this.portOverride        !== undefined ) {
        this.bundle.addNodejsappDefinition(this.nodejsappOverride, this.startscriptOverride, this.portOverride);
        try {
          const msg = 'define : NODEJSAPP "' + this.nodejsappOverride + '" with startscript "' + this.startscriptOverride + '"';
          params.response.console.log(msg);

          // Also log the message for posterity
          if (params.arguments.silent === undefined) {
            const logger = Logger.getAppLogger();
            logger.debug(msg);
          }
        }
        catch (error) {
          // logging errors can be thrown in some of the mocked tests... just ignore it.
        }
      }
    }
  }