public function logAction($action, Model $model = null, $id = null, $comment = null, $item = null) {
        if (!Configure::read('Admin.logActions')) {
            return false;
        }

        $log = ClassRegistry::init('Admin.ActionLog');
        $query = array(
            'user_id' => $this->Auth->user('id'),
            'action' => $action
        );

        // Validate action
        if (!$log->enum('action', $action)) {
            throw new InvalidArgumentException(__d('admin', 'Invalid log action type'));
        }

        if ($model) {
            $query['model'] = ($model->plugin ? $model->plugin . '.' : '') . $model->name;

            // Get comment from request
            if (!$comment && isset($this->Controller->request->data[$model->alias]['log_comment'])) {
                $comment = $this->Controller->request->data[$model->alias]['log_comment'];
            }

            // Get display field from data
            if (!$item) {
                if (isset($model->data[$model->alias][$model->displayField])) {
                    $item = $model->data[$model->alias][$model->displayField];
                }
            }
        }

        $query['foreign_key'] = (string) $id;
        $query['comment'] = $comment;
        $query['item'] = $item;

        return $log->logAction($query);
    }