To do this the callback function is pulled from the option redcapAPI_logger
which defaults to doing nothing.
When the package starts up, it checks to see if SPLUNK_TOKEN and SPLUNK_URL
ENV variables are set and if so, it automatically redirects the
redcapAPI_logger to point at Splunk. It will also use SPLUNK_PROJECT
if defined, otherwise the project will be the directory name that the
code is executing from.
There are also two helper functions logWarning and logStop which
will call logging if enabled first, then warn or stop as requested.
The function createSplunkFUN will create a SPLUNK logger callback function.
It will pull 'SPLUNK_TOKEN', 'SPLUNK_URL' and 'SPLUNK_PROJECT' from ENV if
the corresponding arguments are not specified.