This function is used in Python Scripting.

Description

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

Caution: 

For the system.perspective.alterLogging 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.   Note, this will open potential security holes in the Gateway.

wrapper.java.additional.X=-Dperspective.enable-client-logging=true



Syntax

This function accepts keyword arguments.


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

  • Parameters

Boolean remoteLoggingEnabled - Will 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] 

String level - The desired Session logging level. Possible values are: all, trace, debug, info, warn, error, fatal, or off. The default is info. [optional] 

String remoteLoggingLevel - The desired remote logging level. Possible values are: all, trace, debug, info, warn, error, fatal, off. The default is warn. [optional] 

String sessionId - Identifier 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] 

String pageId - Identifier of the page to target. If omitted, the current Page will be used automatically. [optional] 

  • Returns

Nothing

  • Scope

Gateway, Perspective Session

Code Examples
Code Snippet
# Alter the logging level to trace.
system.perspective.alterLogging(level = 'trace')
Keywords

system perspective alterLogging, perspective.alterLogging