qacli log

Control the content and location of debug log data.

Usage

log  {-p <enable|disable>|-l <NONE|ERROR|INFO|DEBUG|TRACE>} [--] [-h]

Extended Description

All Helix QAC commands and UIs produce logfiles that provide detailed information about the execution of each command – these can be useful to the user and support to determine the exact cause of errors. The level of detail in the logs and the location can be changed. By default, the logging level is set to ERROR and the logfile location is in the User Data Location:

  • Windows: %localappdata%\Perforce\Helix-QAC-<version>\app\logs
  • Linux: ~/.config/Perforce/Helix-QAC-<version>/app/logs/

Both can be modified on a system wide basis. They can also be modified on a per-project basis with qacli pprops ‑‑misc‑settings LOG_LOCATION_TYPE. See Miscellaneous Settings for more information.

Options

Name, shorthand Default Description
‑‑help, ‑h   Displays usage information and exits.
‑‑ignore‑rest, ‑‑   Ignores the rest of the labeled arguments following this flag.
‑‑project‑logging, ‑p   Enables project level logging, with logs going to: prqa/configs/<config-name>/logs
‑‑set‑level, ‑l  

Sets the logging level for the entire Helix QAC system. This includes all Helix QAC UI interfaces.

The amount of information placed in the log files is dependent on the log level:

  • NONE - No logging.

  • ERROR - Log only error information.

  • INFO - Log errors and extra information.

  • DEBUG - Log debug information (includes logs for each component).

  • TRACE - Log everything that is possible.

With the higher levels of logging (such as DEBUG or TRACE) the size of the logfiles can grow very quickly. As such, these levels should only used when investigating issues.
When the log level is set to DEBUG or TRACE any console output from Helix QAC for C and Helix QAC for C++ parser options (for example -settings+) will be redirected to the Helix QAC log files. These log files are sorted by time, and so console output from different processes running concurrently will become mixed. In this event, you can use the PID following the time stamp on the log line to filter output for a specific component process.
You will have to restart any running Helix QAC GUI for a change in setting to take effect for that GUI.
Logfile names follow the format: Helix-QAC_<Date>T<Time>_<PID>.log

Logfile content typical has 4 columns: <Timestamp> <PID> <Log Level> <Message>

Examples

Change Logging Level

By default, the debug level is set to ERROR. The following command can be used to change this to TRACE for example:

qacli log --set-level TRACE

You can choose from NONE, ERROR, INFO, DEBUG, and TRACE. NONE specifies that no logs are to be written, and TRACE specifies that everything possible is to be logged.

Enable Project Logging

qacli log --project-logging enable

Now all project specific logging (i.e. commands with a -P or --qaf-directory) will be placed in the prqa/configs/<config-name>/logs sub-directory. Commands that are not project specific will continue to be logged under the UDL in the app/logs sub-directory. To disable project logging, use the following:

qacli log --project-logging disable