Event Logger for Errors and Activity.
$app : \TriTan\type
writeLog( $action, $process, $record, $uname)
Writes a log to the log table in the database.
Purges audit trail logs that are older than 30 days old.
Purges system error logs that are older than 30 days old.
logError( $type, $string, $file, $line)