Log
The Log functio nis triggered automatically every time a log entry is created within the MDT.
This provides a simply way to integrate your own logging systems, webhooks or third-party tools.
You can use this function to forward log actions (such as record creation, updates or deletions) to your own logging system, Discord webhook, database or any other external service.
By default, this function is empty and does nothing, but you can freely adapt it to fit your needs.
Parameters:
type(string): The category of the log entry. Possible values:citizens,incidents,reports,evidence,vehicles,warrants,bolos,weaponsandcamerasaction(string): The action performed. Possible values:create,updateanddeleteauthor_stateid(string): The state id of the opfficer responsible for the action.
---@param type string('citizens', 'incidents', 'reports', 'evidence', 'vehicles', 'warrants', 'bolos', 'weapons','cameras')
---@param action string('create', 'update', 'delete')
---@param author_stateid string<drx_mdt_officers.stateid>
---@return void
function Log(type, action, author_stateid)
-- Using any third parties to store logs? If so, you can call them here.
endLast updated
Was this helpful?