JSPM

@zowe/zos-logs-for-zowe-sdk

8.21.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1029
  • Score
    100M100P100Q121234F
  • License EPL-2.0

Zowe SDK to interact with the z/OS logs

Package Exports

  • @zowe/zos-logs-for-zowe-sdk
  • @zowe/zos-logs-for-zowe-sdk/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zowe/zos-logs-for-zowe-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

z/OS Logs Package

Contains APIs to interact with logs on z/OS (using z/OSMF log REST endpoints). z/OSMF version 2.4 or higher is required. Ensure that the z/OSMF Operations Log Support is available via APAR and associated PTFs.

API Examples

List z/OS logs

import { ProfileInfo } from "@zowe/imperative";
import { GetZosLog, IZosLogParms } from "@zowe/zos-logs-for-zowe-sdk";

(async () => {
    // Load connection info from default z/OSMF profile
    const profInfo = new ProfileInfo("zowe");
    await profInfo.readProfilesFromDisk();
    const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
    const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
    const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);

    const zosLogParms: IZosLogParms = {
        direction: "backward",
        range: "1m"
    };
    const response = await GetZosLog.getZosLog(session, zosLogParms);
    console.log(response);
})().catch((err) => {
    console.error(err);
    process.exit(1);
});