K
K
kill942015-09-15 21:20:50
Journaling
kill94, 2015-09-15 21:20:50

How to store logs?

how to store (structure) all logs of user actions, so that you can find out where (which field) what changed?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Kovalsky, 2015-09-15
@dmitryKovalskiy

Well, for starters, drop youthful maximalism - it is very expensive and hard to store "all" user actions. If you are interested in exactly "where / what field changed" then for this there is a banal database with the history table. where it is written Who / When / What is the value / Where did it come from. In any case, you need to start not "what to do with the logs", but what kind of application you have. No matter how the solutions for the web / desktop / mobile phones and microelectronics will differ.

M
Max, 2015-09-15
@MaxDukov

in normal databases, there is an audit of actions and so, and it only needs to be configured.
in the rest you can hang a trigger. Or allow work only through procedures in which to implement logging.

Z
Zakharov Alexander, 2015-09-16
@AlexZaharow

I kind of thought about that too. In principle, a normal desire. You can only look at this situation a little from the outside. For example, patches were invented for source codes. This is where in the files at the beginning of the lines are +/-. In principle, if we consider records in the database as rows, then a similar approach can be applied to them. You can look at it as an XML type file. Then you can "invent" something like "commands" to modify the structure "add a node along the xPath path", "delete a node by xPath", "replace the node by xPath with the specified one", etc. Even the git algorithm could be "think about". Although I confirm - it will not be easy to implement.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question