Oleqlog

Usage

Send events, levels, optional fields, and client options with oleq_logs

Send events

await log.info(LogPayload(message: 'screen opened'));
await log.warn(LogPayload(message: 'slow query', body: {'ms': 420}));
await log.error(LogPayload(
  message: 'checkout failed',
  kind: LogKind.res,
  body: {'status': 402},
));

await log.flush();
await log.close();

Call flush() before app backgrounding or isolate shutdown when possible.

Levels

Pass as type on the event, or call the matching method (log.info(…), log.error(…), …).

tracedebuginfosuccesswarnerrorfatalauditmetric

Optional fields

FieldNotes
kindLogKind.req or LogKind.res — separate events; dashboard shows REQ / RES badges
bodyAny JSON-serializable attachment
track / security / metricsStructured maps on the event

Options

OptionRequiredDefault
appNameyes
apiKeyno*OLEQLOG_API_KEY / --dart-define
baseUrlnoproduction API
environmentnodevelopment
flushIntervalMsno2000
maxBatchSizeno50
sensitivenooptional field redact / strip before send

*Required unless OLEQLOG_API_KEY is set.

Stack recipes: Examples

On this page