It should be possible to log events by calling a script in script task.
The function should take the following arguments:
Level - (must be one of debug, info, warning, error or critical) we may react to certain log levels later as a part of another ticket, for instance "Info" and above could send a message to Sentry, "Error" and "Critical" could fire off email messages.
Code - a short string that can be used to quickly search logs. ex ("approval_rejection")
Message - a longer more descriptive string with any information you wish to log.
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:
Date and Time
Task
Workflow
Study
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.
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.