Have a look at the Event log module (a module also consists of "Drupal code", right?). Some details about it, from its project page:
This module logs specific events. The events are saved in the database and can be viewed on the page admin/reports/events. Furthermore, a views integration is provided in which you can relate for instance a node to its events. You could use this to display the total number of views, or the number of times that the node has been modified and by which users.
Currently, the following events are supported:
- User authentication (login/logout/request password)
- Node operations (CRUD)
- User operations (CRUD)
- Menu operations (custom menu's and menu items CUD operations)
- Taxonomy operations (vocabulary and term CUD operations)
The event log can be easily extended with custom events. For more information please have a look at the API documentation and the available sub modules.
You are probably going to be interested in these specific events and facilities of it:
- User authentication.
- User operations (CRUD).
- ... log can be easily extended with custom events.
- Views integration.
- API documentation.
- The available sub modules.