Logging and Debugging Issues

Logs are files where all the debugging information is dumped to. Log files are useful to debug any issue while working on top of the Chat Engine.

The following sections describe the logging methodology of NVIDIA ACE Agent, the different log files generated, and how they can be managed efficiently.

Log Location

NVIDIA ACE Agent stores logs related to the Chat Engine in a directory named log of the current working directory. In most cases, this is the quickstart script directory.

Log Naming Convention

NVIDIA ACE Agent stores logs with the name logfilename_hostname_time.log. Logs of multiple executions are not lost. For better accessibility, the symbolic link for the latest log file is created and stored with the simpler name logfilename.log in the same directory.

NVIDIA ACE Agent stores the following log files:

  • The Chat Engine log file chat_engine_hostname_time-pid.log with symbolic link chat_engine.log.

  • Health Monitor log file chat_engine_health_hostname_time-pid.log with symbolic link chat_engine_health.log.

  • Logs of all plugin endpoints are stored separately in plugin_modulename_hostname_time-pid.log with a symbolic link to plugin_modulename.log. For example, the weather module logs are stored as plugin_weather_hostname_time-pid.log and its symbolic link is plugin_weather.log.

  • For speech based log files, refer to the Audio and Metadata Logger section.

Exposing Chat Engine Logs to the Console

ACE Agent supports five logging levels DEBUG, INFO, WARNING, ERROR, and CRITICAL similar to Python logging modules. By default, log level WARNING and above are shown on the console, whereas, log level DEBUG and above are dumped into log files.

For debugging purposes, ACE Agent allows you to change the log level for console logs. You can change the log level using the --log-level <LOG_LEVEL> argument with the aceagent tool for any component.

aceagent chat cli -c <bot_directory_path> --log-level debug
aceagent plugin-server deploy -c <path_to_fm_config> --log-level debug

Audio and Metadata Logger

The speech controller dumps the ASR and TTS audio data in the current working directory. The directory, speech_logs, is mounted to the speech controller container.

The directory structure for the logging directory will look similar to this:

Directory structure for logging directory

If you want to disable the audio and metadata logger, you can set the enable_logging flag to false in the speech.yaml file in the pipeline config. For example, in the sample bot under bots/stock_bot/speech.yaml file, we need to update the parameter:

riva_logger:
  RivaLogger:
    data_dump_path: "/workspace/log"
    enable_logging: true