how to create microservice which create logger file of multiple application?


my target is to create microService -

1)Microservice which create log file of perticular application in txt format.

2)how to stored same log in database?

Hello Harshali.


To create microservices, please take a look on this guide.

https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/Designing_the_architecture_of_your_OutSystems_applications/Microservices_Architecture_in_OutSystems


Regarding your goal, I think you have two options:

-create the log in the database and only when asked, export it as txt.

-store the log into a txt file and when the file is finished (end of the day/week/whatever upload it to database.


OS is very Database centric. To create/edit/read files you have to go with forge components

https://www.outsystems.com/forge/component-overview/68/filesystem


thanks.


for first option -

create the log in the database and only when asked, export it as txt.

what is the steps? can you share  documentation related to this?

Hello,

can you help me .my question is-

what is the steps after installing file system? How to used it in outsystems studio?


If you mean default logs, they are stored by OS. You can check them in Service Center.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Troubleshooting_Applications/Troubleshoot_Service_Actions_Using_Logs


If you mean application-specific logs, you can implement your own logic. it will depend if it is Mobile, Traditional or Reactive. Logger is a popular option to be an example.

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/JavaScript_API/Logger


Your question is very vague so there is not much that can be said. Because you are starting I leave here the easiest process. I could tell a few more complex.

The steps for suggestion 1 are:

  • Have a logging module.
  • Write to logging module what you think is relevant for logging.
  • Create an Export function.

For option 2 (on Personal Environment you can't write to local files) you write to a temporary table (to avoid deadlocks) and write into file every x seconds.