Home  >  Article  >  Backend Development  >  How to reasonably log when the website code is deployed to multiple machines at the same time?

How to reasonably log when the website code is deployed to multiple machines at the same time?

WBOY
WBOYOriginal
2016-10-22 00:14:241016browse

If you write to a file, the log will be scattered to different machines, which makes debugging inconvenient.

If written to the database, the log changes cannot be automatically flushed out like the tail -f command.

Is there any good way to log?

Reply content:

If you write to a file, the log will be scattered to different machines, which makes debugging inconvenient.

If written to the database, the log changes cannot be automatically flushed out like the tail -f command.

Is there any good way to log?

Tell me about our company’s processing method, log is written to DB, and the monitoring platform performs monitoring.

Use rsyslog to log to the same machine, and then process it centrally.

Recommended to use ELK set

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn