pub fn record( conn: &Connection, action: &str, tracking_id: &str, user_id: Option<i64>, details: Option<&str>, ) -> Result<i64, Error>
Record an audit log entry.
Returns an error if the insert fails.