Skip to content

FetchCanisterLogsOptions

Defined in: packages/pic/src/pocket-ic-types.ts:1268

Options for fetching canister logs.

Principal

canisterId: Principal

Defined in: packages/pic/src/pocket-ic-types.ts:1272

The Principal of the canister to fetch logs for.


optional filter: CanisterLogFilter

Defined in: packages/pic/src/pocket-ic-types.ts:1289

Only return the log records in the given range. Defaults to all log records.


sender: Principal

Defined in: packages/pic/src/pocket-ic-types.ts:1283

The Principal to send the request as.

By default, only a canister’s controllers can read its logs. Other principals, including the anonymous principal, need the canister’s log visibility to allow them, e.g. logVisibility: { public: null } or logVisibility: { allowedViewers: [principal] } in PocketIc.updateCanisterSettings.