sartography / cr-connect

0 stars 0 forks source link

Logging Script Task #513

Closed danfunk closed 2 years ago

danfunk commented 2 years ago

It should be possible to log events by calling a script in script task. The function should take the following arguments:

something along the lines of: log('info', 'approval_rejection', 'User dhf8r rejected this approval request with the message: ......')

When storing the log in the database the following additional information should be stored/related:

It should be possible to quickly and easily query the logs at the workflow level. get_logs('approval_rejection') // by default will return all logs with this code in this workflow. get_logs_for_study('approval_rejection') // Would return all logs for all studies.