Skip to main content
Version: 8.1


This function is used in Python Scripting.


Changes Perspective Session logging attributes and levels. All parameters are optional, with the caveat that at least one of them needs to be used.


For the system.perspective.alterLogging function to work, the following line needs to be added to the ignition.conf file, and the Gateway restarted. "X" is the next number in the Java Additional Parameters list in the ignition.conf file. Warning, this will open potential security holes in the Gateway, and is not advised.
# Java Additional Parameters,server=y,suspend=n,address=8000



This function accepts keyword arguments.

system.perspective.alterLogging([remoteLoggingEnabled], [level], [remoteLoggingLevel], [sessionId], [pageId])


BooleanremoteLoggingEnabledWill enable remote logging if True. Remote logging will send log events from the Session to the Gateway under the perspective.client logger if they meet the remoteLevel logging level requirement. [optional]
StringlevelThe desired Session logging level. Possible values are: all, trace, debug, info, warn, error, fatal, or off. The default is info. [optional]
StringremoteLoggingLevelThe desired remote logging level. Possible values are: all, trace, debug, info, warn, error, fatal, off. The default is warn. [optional]
StringsessionIdIdentifier of the Session to target. If omitted, the current Session will be used automatically. When targeting a different session, then the pageId parameter must be included in the call. [optional]
StringpageIdIdentifier of the page to target. If omitted, the current Page will be used automatically. [optional]




Gateway, Perspective Session


This function will only work in the Gateway scope if both sessionId and pageId are supplied to the call.

Code Examples

Code Snippet

# Alter the logging level to trace.
system.perspective.alterLogging(level = 'trace')


system perspective alterLogging, perspective.alterLogging