The following files are checked in to xxx(cvs head) to enhance the server logging. Please update and let me know if you have any questions.
1 new file:
com.xxx.fmk.util.ScctServerPatternLayout
public class ScctServerPatternLayout extends PatternLayout {
public String format(LoggingEvent event) {
return ScctProperties.getLogId() + " " + super.format(event);
}
}
3 changed files:
com.xxx.scct.util.ScctProperties
com.xxxp.scct.calypsoadapter.CalypsoAdapter
config/log4j.properties
With the above changes, you will see user session ID before all log messages from your server log file. This can help you quickly identify a user/user session in a multi-user environment.
In certain messages, you will see "unnamed" or "untitled". It means at those points, we can not determine who the current user is.
Example:
logs before the change:
11/29/2011 16:16:18, 522 [MessageHandlerThread-17] [ INFO] LiquidationEngineDAO :[101] - {call pkg_position.getposnforposnview(?,?,?)}
11/29/2011 16:16:18, 522 [MessageHandlerThread-17] [ INFO] LiquidationEngineDAO :[102] - false
11/29/2011 16:16:20, 772 [MessageHandlerThread-17] [ INFO] AdapterUserSession :[1120] - positionDataList size: 1303
11/29/2011 16:16:20, 835 [MessageHandlerThread-17] [ INFO] PortfolioPositionViewConverter :[190] - Populated Portfolio Position Details
11/29/2011 16:16:20, 851 [MessageHandlerThread-17] [ INFO] PortfolioPositionViewConverter :[194] - Calculated Position Summary Data
logs after the change:
ym07378_-8588790108660922597 11/29/2011 16:16:18, 522 [MessageHandlerThread-17] [ INFO] LiquidationEngineDAO :[101] - {call pkg_position.getposnforposnview(?,?,?)}
ym07378_-8588790108660922597 11/29/2011 16:16:18, 522 [MessageHandlerThread-17] [ INFO] LiquidationEngineDAO :[102] - false
ym07378_-8588790108660922597 11/29/2011 16:16:20, 772 [MessageHandlerThread-17] [ INFO] AdapterUserSession :[1120] - positionDataList size: 1303
ym07378_-8588790108660922597 11/29/2011 16:16:20, 835 [MessageHandlerThread-17] [ INFO] PortfolioPositionViewConverter :[190] - Populated Portfolio Position Details
ym07378_-8588790108660922597 11/29/2011 16:16:20, 851 [MessageHandlerThread-17] [ INFO] PortfolioPositionViewConverter :[194] - Calculated Position Summary Data
to disable this feature, change the config/log4j.properties file as follows:
................ hide the new layout, show the old one
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# log4j.appender.A1.layout=com.xxx.fmk.util.ScctServerPatternLayout
.....
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
# log4j.appender.A2.layout=com.xxx.fmk.util.ScctServerPatternLayout
................
The above change only works for actions originated from CalypsoAdapter.handleBrokerMessage, which covers all interactions between Apollo Client and server. Obviously we have messages from other sources. If you like these new log messages, we can enhance those other areas in the future.