Performance: only add log record and sql statement to context if trace/debug level <= debug/info

Description

  1. Log records and logged sql statement increase the context size significantly. We don't need that for production and hence should only add that to context if tracelevel is set to INFO and below.

  2. Minor clean up and add synchronized to CLogErrorBuffer.publish method (it needs to be thread safe).

  3. AD_Issue is another source that can add significant overheat to the system. If your system is tight in resources, you might want to consider setting the "Error Reporting" flag at "System" window to false.

Testing:

  • change TraceLevel between INFO and WARNING and note the difference in memory consumption.

Environment

None

Assignee

Heng Sin Low

Reporter

Heng Sin Low

Labels

Tested By

None

Components

Fix versions

Priority

Major
Configure