R
R
Rockman2015-02-22 19:47:18
PHP
Rockman, 2015-02-22 19:47:18

How and what do you log in your projects?

I am writing a more or less serious project, I need to log any user action and, in general, everything that happens in the system. I want to know how you log and what do you log in your projects? Where do you store it in the database or in files?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2015-02-22
@saboteur_kiev

Login, logout (date, time, IP),
Active actions that cause data changes
queries in case of using search
and the system is not a very clear moment, depending on what kind of project you have.
And to store in basis or files depends on the project. In the case of a simple log for admins, a simpler file. In the case of subsequent use of the log for statistics, or at least if it should be viewed by several people (for example, even one, but not a system administrator), you can even make reports in BD to view logs according to certain criteria

D
Dmitry, 2015-02-22
@thewind

If the project is highload, then it is initially written to a file (definitely not to the database), and then collected and sorted into the database by the collector.

N
Nikita, 2015-02-22
@Panda_Tamara

Logging is necessary for you to search for unauthorized access and system errors. Therefore, you need to log into the log:
Everything else is for curiosity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question