Skip to main content
πŸ‘€ Interested in the latest enterprise backend features of refine? πŸ‘‰ Join now and get early access!
Version: 4.xx.xx

useLogList

Overview​

If you need to list audit log events, you can use the useLogList hook of refine, which uses the get method from auditLogProvider under the hood.

Usage​

CAUTION

This hook can only be used if auditLogProvider's get method is provided.

import { useLogList } from "@refinedev/core";

const postAuditLogResults = useLogList({
resource: "posts",
});

API​

Properties​

PropertyTypeDefault
resource
Required
stringAction that it reads from route
actionstring
authorRecord<string, any>
metaRecord<string, any>
metaDataMetaDataQuery
queryOptionsUseQueryOptions<TQueryFnData, TError, TData>

Type Parameters​

PropertyDesriptionTypeDefault
TQueryFnDataResult data returned by the query function. Extends BaseRecordBaseRecordBaseRecord
TErrorCustom error object that extends HttpErrorHttpErrorHttpError
TDataResult data returned by the select function. Extends BaseRecord. If not specified, the value of TQueryFnData will be used as the default value.BaseRecordTQueryFnData

Return values​

DescriptionType
Result of the react-query's useQueryUseQueryResult<{ data: TData; }>