@adminonthego/b44-logger
v1.3.0
Published
Fail-safe logging wrapper for base44 Deno.serve handlers, shipping structured events to Axiom.
Readme
@adminonthego/b44-logger
Fail-safe logging wrapper for base44 Deno.serve handlers. Ships a structured
event for every invocation to Axiom.
import { withLogging, logEvent } from 'npm:@adminonthego/b44-logger@1';
Deno.serve(withLogging('myFunction', async (req) => {
// ...your handler...
}));Set these env vars in base44: AXIOM_DATASET, AXIOM_TOKEN. If either is
missing, the wrapper degrades to console-only and your handler still runs.
withLogging(name, handler)— auto-logs every invocation, captures thrown exceptions and any non-2xx response body.logEvent(name, level, msg, extra?)— explicit logging for errors a handler swallows into a 2xx response.
