329
Views
4
Comments
OSTrace Setup HowTo
Discussion

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:

0- Nothing
 1- Errors
 2- Errors + Warnings
 3- Errors + Warnings + Info
 4- Errors + Warnings + Info + Debug
  

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.





2011-06-15 10-49-56
AcacioPN
Staff

 Also, don't forget to restart the services after changing the *.exe.config files so that changes are applied.

2011-06-15 10-49-56
AcacioPN
Staff
Hi

In recent revisions of Agile Platform, the architecture of the compiler was changed - and now oshecomp.exe process is started from within CompilerService.exe.

This affects the use of OSTrace directly - if you are enabling OSTrace for oshecomp.exe, you need to restart the Deployment Controller service to make the change effective.

Cheers,
2020-11-17 19-30-43
João Atalaia
You can find instructions for increasing the log level in Java stack here.


2011-06-15 10-49-56
AcacioPN
Staff
Hi all

OutSystems has added the possibility of grabbing OSTrace for some runtime aspects of individual eSpaces.
You can activate OSTrace for an eSpace using a rule in Factory Configuration.

Regards,
Acácio

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.