OutSystems Platform — Auditing 101 — Part I

João Heleno
3 min readJan 22, 2018

--

Either if you’re a newcomer to the OutSystems Platform or if you have some years developing applications with OutSystems you’ve surely had the need to log some kind of message in order to debug your action and follow the value of something.

In the following article I’ll try to explain the basics of auditing and some important aspects you must take in mind.

Out of the box, the platform offers the LogMessage server action.

If you don’t find it in your module’s Logic tab, click the Module Management button in Service Studio to open the Manage Dependencies window and add it.

Referencing LogMessage in your module

Using “LogMessage” in your action flows

Once referenced, you can use LogMessage in your action flows. It has two mandatory inputs: Message and ModuleName. They’re both text inputs.

The Message one is what you want to see in your environment management console (Service Center). You can log, 2000 characters at most!

The ModuleName can be your module name or action name or something else, so that you can easily distinguish different messages.

Action flow with LogMessage server actions

After running your action, if you want to see your messages go over to Service Center and select the Monitoring menu. Then go to General sub-menu. You can see all the seven messages that were audited. You can also filter by Module name.

LogMessage is asynchronous by nature

Please notice that the logging is asynchronous! That means that the order of the messages in your flow may not be the same when viewing in the management console. In my previous image you can see that the messages are not in order even though they were in order in the action. They were registered in the following manner: ONE, SEVEN, SIX, FIVE, etc.

Do not assume the order you see in the management console is the exact same order that was executed by your action.

Turning off Logging

If you have many LogMessages spread across your code and you want to disable them you don’t need to open the module and erase them. You can go to Service Center and under your module’s Operation tab, uncheck the Auditing option.

In Part II, I will write about the AsynchronousLogging API. A more advanced set of actions to log content in your environment.

--

--

João Heleno

Senior Consultant @ IG&H Platform Services | OutSystems MVP