This article was moved to an entry in the Support Knowledge Base. You can find the updated content at www.outsystems.com/goto/ostrace.
The original post was kept for reference reasons, but is no longer certified and should not be used as the reference material.
Overview
OS Trace is a tool that provides extra information, when you need to execute further auditing on OutSystems Services.
Configuration
You can only enable OSTrace on OutSystems services, and on the OutSystems compiler. In order to do it, you need to manually add some xml config data. The xml config files referred are located at the Platform Server install folder, (e.g., "C:\Program Files\OutSystems\Platform Server") and you have one config file per service. The mapping is the following:
- OutSystems Deployment Controller Service: CompilerService.exe.config
- OutSystems Deployment Service: DeployService.exe.config
- OutSystems Log Service: LogServer.exe.config
- OutSystems Scheduller Service: Scheduler.exe.config
- OutSystems SMS Connector: SMSConnector.exe.config
- OutSystems Compiller: OSHEComp.exe.config
The xml that enables OSTrace is displayed next. Please note that the "system.diagnostics" element must be placed after the "configSections" element within the target config file.
<system.diagnostics> <switches> <add name="LogLevel" value="4" /> </switches> <trace autoflush="true"> <listeners> <add name="MyListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="PATH-TO-LOG"/> </listeners> </trace> </system.diagnostics>
The Log Level stated above, coorresponds to the loggin level wished. There are 5 levels:
PATH-TO-LOG should be a folder in your disk in which any user can write. If in doubt, create a folder named TEMP in the C: drive, and configure this value as C:\TEMP\ServiceName.log
Example
For a typicall OSTrace setup, e.g. the Outsystems SMS Connector Service, you should add the follow xml to SMSConnector.exe.config:
<system.diagnostics> <switches> <add name="LogLevel" value="4" /> </switches> <trace autoflush="true"> <listeners> <add name="MyListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\temp\SMSConnector.log"/> </listeners> </trace> </system.diagnostics>
Recommendations
You should only enable OSTrace for debug purposes. Because OSTrace dumps a lot of information, logs will grow very rapidly.
Also, don't forget to restart the services after changing the *.exe.config files so that changes are applied.