Oleqlog

Usage

Send events, levels, optional fields, and client options with Oleq.Ai.Logs

Send events

await log.InfoAsync(new LogPayload { Message = "server started" });
await log.WarnAsync(new LogPayload { Message = "slow query", Body = new { ms = 420 } });
await log.ErrorAsync(new LogPayload
{
    Message = "payment failed",
    Kind = LogKind.Res,
    Body = new { status = 402 },
});

await log.FlushAsync();
await log.DisposeAsync();

Call FlushAsync() before shutdown. Dispose the client when the app stops.

Levels

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

tracedebuginfosuccesswarnerrorfatalauditmetric

Optional fields

FieldNotes
KindReq or Res — separate events; dashboard shows REQ / RES badges
BodyAny JSON-serializable attachment
Track / Security / MetricsStructured blobs on the event

Options

OptionRequiredDefault
AppNameyes
ApiKeyno*OLEQLOG_API_KEY
BaseUrlnoproduction API
EnvironmentnoDOTNET_ENVIRONMENT / ASPNETCORE_ENVIRONMENT or development
FlushIntervalMsno2000
MaxBatchSizeno50
Sensitivenooptional field redact / strip before send

*Required unless OLEQLOG_API_KEY is set.

Stack recipes: Examples

On this page