Message log
Question

how to log message of exception and write into text file ?

Hi Sangam,

The Exception Handlers have a "Log Error" input that defines if the error is logged or not.

If the error is logged, then the message will appear on Service Center -> Monitoring -> Error Log.

There, you can download to an excel file all the error logs for a given period.

Hope this helps,

Pedro

Hi Sangam,

You can use LogMessage client and server action that are available in system module to log messages. 

 Why you want to log in to text file?


Thanks

Vinod


Hi Sangam,

You can do that in the exception handler for the exception you're trying to log:

The error handler contains a variable called ExceptionMessage that you can then use as input for your server action that generates the text file:

For further instructions on how to generate the text file, please refer to this post by Kilian Hekhuis: https://www.outsystems.com/forums/discussion/60243/create-a-txt-file/#Post231692


Kind regards,

Jeroen


Hey,
For every exception logging message and download txt file is not good solution.
We are following some process like whenever exception occurs we store it into entity and at the specific time our timer process will help to download all log into txt file.
Kindly confirm which one is better for you so as per that I will try to provide solution for you.
For every log download txt solution is like

add reference of TextToBinaryData() from BinaryData.

Thanks

Yogesh

@Yogesh Javir  Yes I am ok with your suggestion .Please provide me solution with Oml

Hey @Sangam 

Please find sample attachment. If it helps you then please let me know .

Thanks

Yogesh

exceptionToTxtDemo.oml

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