Output Console Buffer problems

Hi All,

In Ignition designer, I am printing (using print statements) a lot of data to the output console when I run my program. I noticed that when I dump too much data, the data gets truncated so I end up missing some.

Where is the output console buffer configured? Is it possible to increase this buffer so that I can see more of it?

If there is no solution to this, is there a way to dump my data to a log file. I know that Gateway output gets dumped to wrapper.log. How about client scripts? Is there a way to dump client scripts to a file as well? Any help would be appreciated. Thanks.

axelf911

I have been looking for this setting as well. I could have sworn I set it at some point in Ignition 7.9, but now I can't find it in any of the obvious places (ignition.conf file, Project Properties). I am using Ignition 8.1 now. I searched through many posts in the forum with the search phrase "output console" and this is the only one I found related to this problem.

@Daniel_Webb

It's simple enough to script:
Example:
Create a library script called console scripts (or whatever seems logical for the given design environment):
image

Create various console utility functions such as getting the console, getting the console text, creating a log file, and for clearing the console

from com.inductiveautomation.ignition.client.util.gui import OutputConsole
from java.awt.event import ActionEvent

# Recursive function searches the subcomponents of the console until the textpane is located,
# ...and then returns its text property
def getConsoleText(console):
	for component in console.components:
		if component.__class__.__name__ == 'JTextPane':
			return component.text
		else:
			textpaneText = getConsoleText(component)
			if textpaneText:
				return textpaneText

# Appends the given text to the end of a log file 
def logConsoleText(consoleText):
	# Define the path and file name of the log file
	filepath = 'C:/Users/testUser/Desktop/consoleLog.txt' #!!! Change this as needed
	
	# Append the console text to the end of the log file
	system.file.writeFile(filepath, consoleText, True)

# Programatically clears the console
def clearOutputConsole(console):
	# Clear the console in preparation for the next batch
	console.actionPerformed(ActionEvent(console, 0, 'clear'))

# Retrieves an instance of the output console
def getOutputConsole():
	return OutputConsole.getInstance()

Then call the utility scripts as needed whenever periodic console specific log dumps are needed:

# Get the output console from the designer
console = consoleScripts.getOutputConsole()

# Get the text from the console
consoleText = consoleScripts.getConsoleText(console)

# Dump the console text to a file
consoleScripts.logConsoleText(consoleText)

# Clear the console in preparation for the next batch
consoleScripts.clearOutputConsole(console)