Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
119 views
in Technique[技术] by (71.8m points)

php - Logging of processes and changes

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...