Storing logs for a custom plugin

Storing logs for a custom plugin

by Hittesh Ahuja -
Number of replies: 0

Hi,

I'm in the process of developing a custom enrol plugin and as it stands there would be many cases where I would need to log either the action of the user, log errors to the database and so on. I quite like the "Logs" pages in Moodle where things are searchable by the activity type, user name etc but unfortunately my data being so granular and only one plugin specific ( which is not an activity) I dont think using the Events API would be much of use as I would like administrators like myself to search through the error throughout the site in once place rather than selecting a single course ? 

Does anyone think if this is possible and possibly in what way ? 


A typical log entry that I envision would be something like : 

plugin_type | userid | action | error/message | timecreated 

Average of ratings: -