def METHOD_NAME(self, record, operation):
    """Build the operation log dict based on record.
    :param record: the updated record.
    :param operation: the trigger operation on this record.
    :return a dict representing the operation log to register.
    """
    oplg = {
        'date': datetime.now(timezone.utc).isoformat(),
        'record': {
            'value': record.get('pid'),
            'type': record.provider.pid_type
        },
        'operation': operation,
        'user_name': 'system'  # default value, could be override
    }
    if current_librarian:
        oplg |= {
            'user_name': current_librarian.formatted_name,
            'user': {
                'type': 'ptrn',
                'value': current_librarian.pid
            },
            'organisation': {
                'type': 'org',
                'value': current_librarian.organisation_pid
            },
            'library': {
                'type': 'lib',
                'value': current_librarian.library_pid
            },
        }
        if (lib_pid := flask_request.args.get('current_library')) \
                and lib_pid in current_librarian.manageable_library_pids:
            oplg |= {
                'organisation': {
                    'type': 'org',
                    'value': current_librarian.organisation_pid
                },
                'library': {
                    'type': 'lib',
                    'value': lib_pid
                }
            }
    # Allow additional informations for the operation log.
    #   Subclasses can override the ``additional_informations()`` method
    #   to add some data into the operation log dict
    oplg |= (self.get_additional_informations(record) or {})
    return oplg