--- title: "system.perspective.alterLogging" description: "Changes Perspective Session logging attributes and levels." --- # system.perspective.alterLogging > Changes Perspective Session logging attributes and levels. 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` 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. ``` wrapper.java.additional.X=-Dperspective.enable-client-logging=true ``` ```python title="Example" # Java Additional Parameters wrapper.java.additional.1=-Ddata.dir=data wrapper.java.additional.2=-Xdebug wrapper.java.additional.3=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 ``` ::: ## Syntax :::tip This function accepts [keyword arguments](platform\scripting\python-scripting\user-defined-functions.md#keyword-arguments). ::: `system.perspective.alterLogging([remoteLoggingEnabled], [level], [remoteLoggingLevel], [sessionId], [pageId])` ### Parameters Type | Parameter | Description ------- | ------- | ------ 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 :::note This function will only work in the Gateway scope if both `sessionId` and `pageId` are supplied to the call. ::: ## Code Examples ```python title="Code Snippet" # Alter the logging level to trace. system.perspective.alterLogging(level = 'trace') ```