Is there a good way to record business logs for analysis?

Source: Internet
Author: User
Currently, it is developed to make it easy to understand. It is a custom logging method and is written to a file every day. The recorded data includes time, user ID, log level, error location, and error information analysis. A process is used to read log files. Sending a high error level to mail... is currently under development. To make it easy for you to understand, it is a custom logging method, which is written to a file every day.
The recorded data includes: time, user ID, log level, error location, and error message.
Analysis involves a process to read log files. Send high error levels to your mailbox every day.
Currently, there are about 3 m log files every day. If it is inconvenient to analyze all the logs, you are prepared to put the data in es.
But it seems very nonstandard, and PHP should have such a wheel. Logging and analysis toolsAre you recommended?

Analysis is important.

Reply content:

Currently, it is developed to make it easy to understand. It is a custom logging method and is written to a file every day.
The recorded data includes: time, user ID, log level, error location, and error message.
Analysis involves a process to read log files. Send high error levels to your mailbox every day.
Currently, there are about 3 m log files every day. If it is inconvenient to analyze all the logs, you are prepared to put the data in es.
But it seems very nonstandard, and PHP should have such a wheel.Logging and analysis toolsAre you recommended?

Analysis is important.

I use seaslog to record different error levels to different files. If the error level is too high, send an email prompt in the code

Sumologic?

First, use the grok of Logstash to make the format ready, and then store it in elasticsearch. Then, use Kibana to visualize the data.

composer require monolog/monolog

SentryIt can fully meet the requirements, but it is not used to record logs. It is used to record error logs. When an error level is found to be high, an alarm will be reported to your team! Now you haveDockerIt is very convenient to build one by yourself.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.