Enabling the debug mode

To help troubleshoot issues that might arise in IBM Z ChatOps, you can enable debug mode to collect more logs and refer to the logs for more details that can help you diagnose and solve configuration problems.

Procedure

  1. Enable debug mode for IBM Z ChatOps.
    1. Locate and open the configuration file $ZCHATOPS_HOME/config/bnz-server.yaml.
    2. Edit the file to make the following changes:
      • Change log>level to debug
      • Change log>consoleSilent to false
  2. Enable debug mode for the Common Bot Framework by exporting the following environment variables.
    See https://github.com/zowe/zowe-bot#environment-variables for more information.
    • export COMMONBOT_LOG_LEVEL=debug
    • export COMMONBOT_LOG_CONSOLE_SILENT=false
    Note: If you're running IBM Z ChatOps in container, you need to export the environment variables in your container.
  3. Run bnzsvr restart to restart IBM Z ChatOps.
    Note: If you’re running IBM Z ChatOps in container, you need to run this command in your container or use the Container Command Line Utility bnzContainer.sh restart to restart IBM Z ChatOps.

Results

The debug mode is enabled. The debug logging information is written to the following directories:
  • IBM Z ChatOps log file: $ZCHATOPS_HOME/logs/*
  • Common Bot Framework log file: $ZCHATOPS_HOME/node_modules/@zowe/bot/log/commonBot.log

If you’re running IBM Z ChatOps in container, you can use the Container Command Line Utility bnzContainer.sh collect to collect the logs.

What to do next

Next, you can resolve your problem by referring to the logs. If you cannot resolve your problem, you can attach the log file archive when you contact IBM support.