E
E
ekkorkka2021-06-07 12:51:30
Nginx
ekkorkka, 2021-06-07 12:51:30

A daemon process that will write every 5 seconds to an NGINX log file?

Hello!
Guys, help me create a daemon that will write every 5 seconds to the NGINX log file (when you try to crash the process, it should restart)
When the file reaches a size of more than 300 kb, maybe 500, (the point is in some content) the log file should be cleared
B 3 file should contain a log about successful cleaning of the file with NGINX logs with the date and time of cleaning.
Logs with 500 errors should be added separately to
file 4. Logs with 400 errors should be added to file 5

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Arkhipov, 2021-06-07
@IgorArkhipov

Almost everything can be done with regular logrotate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question