L
L
lahomie932018-11-02 08:37:48
Backend
lahomie93, 2018-11-02 08:37:48

How to implement a user logging system?

Hello! I had such a problem: I got a freelance contract to make a mobile client application for crm that interacts with a ready-made api written in ASP.NET. I managed to successfully implement a working application, but the customer wants to add a logging system to the load, which stored somewhere on the server a txt file with logs of the actions of all users of the application. Approximately in this form:
2018-10-19T11:29:32+0300 [email protected]: State: 0; Number: null
2018-10-19T11:30:36+0300 [email protected]: State: 0; Number: null
2018-10-19T11:30:36+0300 [email protected]: State: 2; Number: +79001234567
2018-10-19T11:30:36+0300 [email protected]: Incoming: +79990987654; LastCall: 1
2018-10-19T11:31:10+0300 [email protected]: State: 2; number:
Tell me, can I solve this task myself with the help of some external web service, or should I refuse this work and delegate it to the backend developer who created the api?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ershov, 2018-11-02
@lahomie93

For mobile application analytics, ready-made cloud solutions are usually used, like https://firebase.google.com/docs/analytics/
If you need to track user actions in the application, then you place calls to the analytics framework in the right places. If you need to write actions to a file, in your own format, write your own action logger that works with the file.
If you need to save logs on the server, then the API developer should add the ability for you to upload a file with logs to the server, or write several methods in the API that will record logs on the server, and you will call them at the right time.
If you need to track not actions in the application, but some actions that do not depend on a specific client application, but are associated only with API methods, then this is a purely server task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question