Obtaining Ignition Logs
Posted by Anna Christian, Last modified by Paul Scott on 07/21/2020 12:01 PM
When troubleshooting or monitoring an Ignition system, it is very important to make a good use of logs. This article goes over the purpose of various Ignition logs and explains how to obtain them.
The Gateway Log
Gateway log contains information about the operation of Ignition Gateway and its sub-systems. For example, database connection errors, OPC and device connection errors, alarm notification errors, etc., will be posted to the Gateway log. Gateway-scoped resources of the projects will also post errors to the Gateway log. These include (but are not limited to) Gateway and Shared script errors, sequential function chart errors, alarm pipeline errors, etc.
Additionally, the loggers obtained using the system.util.getLogger function within Gateway scoped resources will also output to the Gateway log.
Taking a Gateway log export
To obtain a Gateway log export, go to the Gateway’s Status / Diagnostics / Logs page and click on the "Download" icon.
This will download a file with the name containing “system_logs” and the current timestamp, and an extension of .idb, for example: system_logs_19May2017-18-44-45.idb
The file is a SQLite database and can be viewed with a SQLite front end of your choice.
Changing logging levels
You may be advised by Support to change the logging level of a particular logger (or loggers) prior to replicating the issue and obtaining the log export.
To change logging levels, go to the Gateway's Status / Diagnostics / Logs page and click on the "gear" button. On the Log Configuration popup that will open, search for the logger name in the Filter box, and select the desired logging level from the dropdown to the right of the logger name
The Wrapper Log
Wrapper logs are a set of plain text log files located inside the installation directory on the computer where Ignition Gateway is installed. The exact path may vary depending on the installation directory, but the typical path to the location of the wrapper logs is C:\Program Files\Inductive Automation\Ignition\logs\ on a Windows operating system, /var/log/ignition on a typical Linux installation, and /usr/local/ignition/logs/ on a typical Linux ARMHF installation.
Wrapper logs are similar to Gateway logs in that they contain information about the operation of the Ignition Gateway and its sub-systems, as well as the errors generated by Gateway scoped resources. However, there are some important differences between the Gateway log and the wrapper logs:
Thread Viewer and Thread Dumps
The thread viewer displays a snapshot of information about Gateway’s execution threads. This information may be important when troubleshooting certain types of issues. If you are working with Support, you may be asked for a thread dump.
In order to be useful, a thread dump must be taken at the time the issue is observed. Unlike logs, which maintain a record of past messages, a thread dump is a time-specific snapshot and will not contain a record of past states.
Getting a thread dump
To get a thread dump, go to the Gateway’s Status / Diagnostics / Threads, and click the "Download" button on the right. This will download a thread-dump.txt file.
Client Console and Client Diagnostic Tools
Print statements and error messages from Client-scoped scripts, as well as errors from Client-scoped resources like windows and components, are output to the Client console.
It is important to remember that the Diagnostics console exists only for the lifetime of the Client. This means that if the Client is closed, that information is destroyed.
To view messages and print statements output from Client scoped resources during design time without launching a Client, you can use the Designer's Output Console. If it is not already open, you can open the Console from the Designer's top menu, Tools section.
Similar to the Client, the Designer also has a Diagnostics screen, which can be accessed from the Help section of the Designer’s top menu. Please refer to the "Client Console and Client Diagnostic Tools" section for an overview of the information the Diagnostics screen provides.
Java Console is useful when troubleshooting issues with launching Clients using Java WebStart. Java Console is not shown by default, but you can easily enable it from the Java Control Panel.
Please follow these instructions from Oracle on how to enable Java Console from Java Control Panel.
Next time you launch the Client or the Designer using Java WebStart, an additional window showing Java Console output will pop up showing information about the launch process.
To save the Java Console output, use the "Copy" button at the bottom to copy the text, and paste the text into a text file. Save the file.
It is important to remember that the Java Console window exists only for the lifetime of the Client (or Designer). When the Client (Designer) is closed, so is the Java Console window.