Hello everybody I want to raise maybe a little discussion question:
I am creating currently an application which consists of small "bots" who are connected to cnc server.
The server application is created in Php/Laravel8 with it's own api.
The Bots are written/will be in Python.
I want to log every action/connection of the bots and the server. Also I want to show the latest actions to the user in his/her dashboard and down the road in the bot-details.
I could now create 2 tables:
log_types
bot_logs
And log every interaction of the bots with the api and store it into the database.
This has, for me 2 major downsides:
- More load on the mysql server
- php artisan migrate:fresh will delete everything
On the other hand I could use the logging system, provided by laravel. The Channel in this case would be then a log document on the server. The downside is here for me, that reading and writing logs is slower, than writing in a database, I guess at least.
For the moment my attempt is, that I will use for the server logging (major logging) the logging engine of laravel and for all bot-activities/api-interactions I use the database.
What do you think about this approach?
I postponed the implementation of it, because for the development I use telescope, but I need to figure out a good wow until I will have a productive solution.
Kind regards and thank you for your thoughts.
question from:
https://stackoverflow.com/questions/65647772/logging-of-processes-and-changes 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…