How to store log files in the log function

Source: Internet
Author: User
The log file storage method in the log function is now added to the website with the log function. do you usually want to save the log file locally or write it to the database? the log is stored in the database ., If the record is more detailed and frequently required for query, it is better to write it to the database for convenient search. Let's look at your own needs and explore references: I have written it and put it in files. however, pay attention to the problem if you frequently write and store log files in the log function.
The website now needs to add a log function. do you usually need to save the log file as a local file or write it to the database?

------ Solution --------------------
Logs are stored in the database.
------ Solution --------------------
If the record is more detailed and frequently required for query, it is better to write it to the database for convenient search. Depends on your needs.
------ Solution --------------------
Discussion

Reference:

I/O has been written and stored in files, but I/O needs to be considered if frequent write and read operations are required.


How can I solve the IO problem? We are an internal invoicing system with around 20 people.

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.