[J2EE] How to increase OutSystems Services log level for troubleshooting

[J2EE] How to increase OutSystems Services log level for troubleshooting

  
Symptoms

While troubleshooting a J2EE OutSystems Platform issue, the available OutSystems Platform log files are scarce in information. This will prevent the disclosure of the error cause.

OutSystems Platform logs are located under the following directory: /opt/outsystems/platform/logs/

For each OutSystems service/tool there is a different log file. Here is a quick resume of the log files:
  • Deployment Controller Service - DeploymentController.log, Old Logs: DeploymentController.log.<date>
  • Deployment Service - DeployService.log, Old Logs: DeployService.log.<date>
  • Scheduler Service - Scheduler.log, Old Logs: Scheduler.log.<date>
  • Log Service - LogServer.log, Old Logs: LogServer.log.<date>
  • OutSystems Compiler - Oshecomp_<user>.sh, Old Logs: Oshecomp_<user>.sh.<date>
  • Configuration Tool (Server Setup) - ServerSetup.log
  • Service Center Installer (SCInstaller) - SCInstaller_<user>.log


Resolution

To solve this, one need to increase the log level of one or more components. Please check the corresponding configuration file in the platform directory (/opt/outsystems/platform):
  • Deployment Controller Service - compilerservice.properties
  • Deployment Service - DeployService.properties
  • Scheduler Service - scheduler.properties
  • Log Service - logservice.properties
  • OutSystems Compiler - oshecomp.properties
  • Configuration Tool (Server Setup) - serversetup.properties
  • Service Center Installer (SCInstaller) - scinstaller.properties

Edit the configuration file and change as follows:

Check for lines starting with:
log4j.logger.<package>=<error level>

For instance to set maximum error log for the OutSystems packages (and sub-packages) set the following configuration:

log4j.logger.outsystems=ALL

For “com” and “org” packages:

log4j.logger.com=ALL
log4j.logger.org=ALL

There are different severity levels for logging messages (check http://logging.apache.org/log4j/docs/api/org/apache/log4j/Level.html form more details):
  • TRACE – “The TRACE Level designates finer-grained informational events than the DEBUG”
  • DEBUG – “The DEBUG Level designates fine-grained informational events that are most useful to debug an application”
  • INFO – “The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.”
  • WARN – “The WARN level designates potentially harmful situations.”
  • ERROR – “The ERROR level designates error events that might still allow the application to continue running.”
  • FATAL – “The FATAL level designates very severe error events that will presumably lead the application to abort.”

There are 2 special logging levels for logging all messages and no logging:
  • ALL - for log all messages – “The ALL has the lowest possible rank and is intended to turn on all logging.”
  • OFF – for no log – “The OFF has the highest possible rank and is intended to turn off logging.”

After changing the configuration files you must restart the services and/or tools.

Note: In production mode all log levels should be set to FATAL or ERROR!


Regards,

João Portela


Hi,

Since version 5.0 of the Agile Platform this configuration files can be found in /etc/outsystems with names like:
 
  • Deployment Controller Service – os.controller.service.properties
  • Deployment Service – os.deployment.service.properties
  • Scheduler Service – os.scheduler.service.properties
  • Log Service – os.log.service.properties
  • OutSystems Compiler - oshecomp.properties
  • Configuration Tool (Server Setup) - configurationtool.properties
  • Service Center Installer (SCInstaller) - scinstaller.properties
Regards,
Renato Gonçalves
Hi,

Since version 8.0.1 of the OutSystems Platform the "OutSystems Compiler" doesn't exist anymore because it was integrated on the "Deployment Controller Service".

The files that currently exist are the following:
  • Deployment Controller Service – os.controller.service.properties
  • Deployment Service – os.deployment.service.properties
  • Scheduler Service – os.scheduler.service.properties
  • Log Service – os.log.service.properties
  • Configuration Tool (Server Setup) - configurationtool.properties
  • Service Center Installer (SCInstaller) - scinstaller.properties
Regards,
Ricardo Alexandre Martins
HI  Ricardo

I had change the configureation on the below properties files as below:-

## log4j.logger.com=ERROR
log4j.logger.com=ALL



[root@SGLHU-VOUTSYS01 outsystems]# vi os.controller.service.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi os.deployment.service.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi os.scheduler.service.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi os.log.service.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi configurationtool.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi scinstaller.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi scinstall.properties
[root@SGLHU-VOUTSYS01 outsystems]# vi scinstall.properties

I will restart the services this evening.

Thanks,
Poh Heng