Reactive icon

Logging Service

Stable version 1.0.0 (Compatible with OutSystems 11)
Published on 05 August 2021 by 
 (0 ratings)

Logging Service

This application allows the user to set the type of log for a specific Module at any time, and with the exposed action he can set the message.
Read more

This application allows the user to set the type of log for a specific module at any time, and with the exposed action he can set the message.

In order to be able to distinguish between logs, was created a log level (log severity) to specify the level of detail of the information stored.

The following points describe the log levels that you can use. This list is showed in a incresead order of severity:

TRACE - should only be used when you need full visibility of what is happening in your application. Not recommended for production environment.

DEBUG - should be used for information that may be needed for diagnosing issues and troubleshooting, or when running the application in the test environment for the purpose of making sure everything is running correctly.

INFO - the standard log level that will inform you every time something happens in your application.

WARN - will warn you when something unexpected happens in the application. 

ERROR - will log any issue that prevents one or more functionalities of working properly.

FATAL - the log level that tells that the application encountered an event or entered a state in which one of the crucial business functionality is no longer working.

Note - When you specify a log level, messages from all other levels of higher granularity are reported as well. For example if the log level of your module is specified as WARN that means the messages marked as WARN, ERROR and FATAL are showed.

All these log levels have a layout patternn, and in this version the layout is the same for all the levels. The pattern is as follows:

"%d %ll [%M] {%u} - %m"

%d - Used to output the date of the logging event. The date uses the following format dd/MM/yyyy HH:mm:ss:SSS

%ll - Used to output the log level

%M - Used to output the Module that called the action for logging

%u - Used to output the user agent

%m - Used to output the application supplied message associated with the logging event.

This is an example of an INFO message:

05/08/2021 16:03:31:314 INFO [LoggingServiceDemo] {Mozilla/5.0 (Macintosh; Intel Mac OS X 11_4_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36} - This is a message for the log level id: 3 name: INFO

In order to use the component was also created a new role, this means that even though all the users can see the log levels,  only users with the role OS_LOG_ADMIN can change the log level.

What’s new (1.0.0)
Reviews (0)
Related assets
More from Sergio Duarte