How to change the Conversion Pattern to output Session Number in the TIBCO Spotfire Server logs

How to change the Conversion Pattern to output Session Number in the TIBCO Spotfire Server logs

book

Article ID: KB0076426

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

If you would like to output the session number in the logs, for example in the sql.log, then the Conversion Pattern in the Log4j.properties would be as follows.

Issue/Introduction

This article explains how to change the conversion pattern in the Log4j.properties to output Session Number in the logs.

Resolution

For TIBCO Spotfire Server 7.5 and above:
From 7.5 and higher version the parameter session-number has been renamed to spotfire.session-number format and the pattern would be as follows.
log4j.appender.sqllog.layout.ConversionPattern=%X{client.ip};%X{spotfire.session-number};%X{principal.name};%d{yyyy-MM-dd'T'HH:mm:ss,SSSZ};%m%n

For TIBCO Spotfire Server 7.0 and below:
log4j.appender.sqllog.layout.ConversionPattern=%X{client.ip};%X{session-number};%X{principal.name};%d{yyyy-MM-dd'T'HH:mm:ss,SSSZ};%m%n