1107
Views
10
Comments
Logging to service center
Service Studio Version
11.11.12 (Build 47235)

Hi Everyone,

I am new to Outsystems so not very familiar with Service Center logs.

I just wanted to ask if it is possible to log messages to Service center logs such as General Logs, Error Logs, Screen Requests logs etc.

And is it possible to customize these log messages.

Also if there is a logging library to help create a template/ schema for logging these error messages.

At the moment I am finding they are being randomly generated when an event occurs.

Thanks

UserImage.jpg
Ellakkiya

Hello Isshaa Aarya,

Kindly gothrough the below document

Log Information

you can customize the log message by using the LogMessage client or server action.

Hope this helps!

Regards,

Ellakkiya.S

2020-04-15 19-07-26
Eduardo Rodrigues

Hello,


you can include general log messages with this action:

Error logging with creating exceptions:



Best regards.

2024-09-14 05-42-00
Ozan Can Çalı
Champion

Hi Isshaa,

Indeed it's possible to programmatically add Service Center logs. 

The messages you add by using the LogMessage action from (System) module will be visible in General Logs.


For the ModuleName parameter, you can enter your own custom name. It will be visible in the Source column in Service Center General Logs. If you don't have a custom name, using GetEntryEspaceName() might be an idea; it returns the name of the current module.


To customize Error Logs, you can raise an exception when an unexpected result occurs and pass your own message as the ExceptionMessage. 

If you have the Log Error property enabled for the Exception Handler, the message will be visible in Service Center Error Logs.


Hope this helps,

Ozan

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Just wondering who is down voting this reply. It is on topic, and a detailed reply. Absolutely no reason in my opinion that it deserves a down vote.

2020-04-15 19-07-26
Eduardo Rodrigues

Good questioning. I even left a like to make up for it too.

2025-03-19 01-45-51
Sandeep Kumar Kolli
UserImage.jpg
Isshaa Aarya

Can we do the same for Screen Requests Logs, that is both logs and error logs?

2024-09-14 05-42-00
Ozan Can Çalı
Champion

Hi Isshaa,

Logging Screen Requests manually is not something you can readily do, as far as I know. Screen Request Logs are designed to show all the incoming requests from screens, not the errors.

Do you have a specific use case? The errors occurring during a screen request are logged by the system in Error Logs by default. You can raise an exception and log your own message (e.g. with the screen name) as explained above.

Regards

UserImage.jpg
Isshaa Aarya

Hi Ozan,


Thank you for providing such detailed answer.

This definitely helps me to understand the service centre logs better.

My requirement is actually to get some  details/info that I am seeing across different logs such as integration, screen etc into general logs.

The reason why I asked if we could customize these logs, then I could add more details to get a complete picture of an event.

Also there are some metrics I see in other logs such as duration in screen logs.... I was hoping to add these information to general logs too against a screen activity.

Hence the question.


I was hoping to use the existing logging mechanism in Outsystems and understand what I can/cannnot customize against these logs.

I hope that replies to your question.

Thank you once again for such detailed answer



2024-09-14 05-42-00
Ozan Can Çalı
Champion

Hi Isshaa,

I see what you're trying to achieve. These system log tables are just regular SQL tables, so you should be able to query them from an application. This documentation might be helpful. And this Forge component makes use of logs, can help to understand how log tables are utilized.

Though a bit technical, I find this forum post also very useful to understand the inner workings of log tables.

In short, you can query different log tables by JOINing them on the same ModuleId or keyword, order them by CreationTime and display them in a list. That way it would give a complete picture (errors, general logs, request logs etc.) of a specific event.

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