Deprecated

Extracting application logs from pods

DeprecatedAfter you deploy the Sterling Order Management System Software Helm chart, extract the application logs from the pods.

View and extract the console logs

To view and extract the console logs from a particular pod, run the following command:
oc logs <pod name> -n <namespace>

Redirecting the log files outside the containers

Browse to the <persistent volume> directory and create the applogs base directory.

Note: Ensure to provide write permissions to the <persistent volume>/applogs directory for its owner group.
  • Liberty logs
    • To redirect the Liberty logs outside the pod, for the global.envs[] parameter, set the following environment variable.
      - name: LOG_DIR
        value: /shared/applogs/$(OM_POD_NAME)/liberty/logs
      

      As the value of the preset OM_POD_NAME environment variable is set to the pod name, the logs are redirected to the <persistent volume>/applogs/liberty/logs directory.

    • To redirect the Liberty dumps outside the pod, set the following environment variable:
      - name: WLP_OUTPUT_DIR
        value: /shared/applogs/$(OM_POD_NAME)/liberty/output

      The output directory of liberty is defaulted to <persistent volume>/applogs/liberty/output

    • To provide a custom location for the verbose gc logs in Liberty, during the Helm chart deployment process, pass the following JVM parameters to the appserver.config.jvm.params[] Helm chart parameter.
      • -verbose:gc
      • -Xverbosegclog:/shared/applogs/$(OM_POD_NAME)/gclogs/%Y%m%d.%H%M%S.%pid.txt

        The verbose gc logs are copied to the <persistent volume>/applogs/<pod name>/gclogs directory. The log file name contains date, time, and Liberty Java process ID.

  • Agent logs
    • To provide a custom location for the agent server gc log, pass the following jvmArgs parameters to the appserver.config.jvm.params[] Helm chart parameter and deploy the Helm chart.
      -verbose:gc -Xverbosegclog:/shared/applogs/$(OM_POD_NAME)/gclogs/%Y%m%d.%H%M%S.%pid.txt

      The verbose gc logs are written to the <persistent volume>/applogs/<pod name>/gclogs directory. The log file name contains date, time, and Liberty Java process ID.

    • To redirect the Sterling Order Management System Software application logs outside the pod, complete the following steps:
      1. Before you deploy the Helm chart, ensure that the Sterling Order Management System Software images are customized to use a custom log4j configuration. For more information, see Customizing log4j configuration.

        Specify the log file location as follows:
        /shared/applogs/${LOG_ARG}/sci.log.

      2. In the Helm chart, specify the jvmArgs parameter in the omserver.servers[] as follows:
        -DLOG_ARG=$(OM_POD_NAME)
      3. While customizing the log4j configuration, if you choose differential extensibility, ensure to add the appropriate customer override properties before you deploy the Helm chart.

        The Sterling Order Management System Software application logs are copied to the <persistent volume>/applogs/<pod name> directory.