One of the Perfect Abstractions Ignition project developers developed a very useful tool for viewing the Ignition wrapper.log file in an Ignition client or designer.
We are releasing the Wrapper.log Viewer project here for other people to use. Download this project file: WrapperLogViewer.proj. Ignition 7.7.5 or higher is required to import the project.
Here is a screenshot of the project:
The Wrapper.log Viewer project was designed to be very easy to install and use. To install it import the Wrapper.log Viewer project into an existing Ignition project or import it as a new project. Note that importing into an existing project will delete existing Gateway Event Scripts in the project. That is all that is needed to install it. No database connections or anything else.
To use the Wrapper.log Viewer project in an Ignition designer open up the ViewerWindow window and put the designer into preview mode. The current contents of the wrapper.log file will display within 5 seconds.
To use the project in a client simply start a client and open the ViewerWindow window. Very easy, nothing to it.
The Wrapper.log Viewer project has been tested on both Windows and Linux.
How it Works
The Wrapper.log Viewer project has a Gateway Timer Script that runs every 5 seconds. It checks to see if the wrapper.log file has been modified. If it has been modified then the last 64,000 characters of the wrapper.log file are copied into a memory tag. The memory tag is automatically created when the project is first used.
A binding and Python scripting in the ViewerWindow window updates the display of the wrapper.log file when the content changes.
The AutoRefresh button is used to toggle on and off the functionality to automatically update the display of the wrapper.log file content. The auto update functionality is on by default.
The ViewerWindow window automatically scrolls the display of the content to the newest content as it comes in.
The Highlight Text field is used to highlight text in the wrapper.log contents that is displayed. This is useful for searching and finding specific text in the content.
More Useful Projects
The Perfect Abstractions development team is interested in developing more useful tools and projects. If you think of something that you want feel free to tell us. We might implement it.
The wrapper.log file is a file on the file system where Ignition is installed.
Ignition logs errors and various important information about what Ignition is doing to the wrapper.log file.
The wrapper.log file is used to test and debug Python scripts that execute in the Ignition Gateway. Gateway Event Scripts, Tag Event Scripts, Python scripts in Alarm Notification Pipelines and Python scripts in Sequential Function Charts all output print statements and logging statements to the wrapper.log file, and the wrapper.log file can be used to debug or test any of them.
The wrapper.log file also collects a lot of information about the internal workings of Ignition. If something is wrong with Ignition the wrapper.log file is a place to go to see if some error is being thrown causing things to not work correctly. If you want to know what and when something is happening in the Ignition Gateway the wrapper.log file may have some useful information about it.
Ignition is very often installed on a computer server that most people do not have local access to -- meaning that people have to gain remote access to the computer in order to access files on the computer. Since the wrapper.log file is stored on the hard drive of the computer where Ignition is installed people have to use a remote access tool like RDP for windows or SSH for Linux or something like VNC. This also means these people need a username/password to log in to the server. This can be a lot of trouble just to view the wrapper.log file.
Some developers may not have or want remote access to the server where Ignition is installed, but if they don't have it then they can't view the wrapper.log file. This problem is solved to a degree by having administrative/configuration access to Ignition's System Console webpage where much of the same information from the wrapper.log file is displayed. But again, it requires that users have access to the configuration of Ignition's gateway in order to see logging information. Developers may not have administrative access to the Ignition gateway. And system administrators may not want to give administrative access to Ignition to all Ignition developers.
The Wrapper.log Viewer project solves the problem by providing easy access to the wrapper.log file in an Ignition client or designer.