@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
18 lines (17 loc) • 840 B
TypeScript
import type { LogRecord, LogTransport, TrackingConsent } from '@funkit/connect-core';
/**
* Web `LogTransport` backed by `@datadog/browser-logs`. Owns Datadog
* initialization, global-context/consent wiring, and the browser-only emit.
*
* This is the platform half of the logger that stays in `@funkit/connect` when
* `FunLogger` moves to `@funkit/connect-core`; React Native ships a Datadog
* React Native transport (`@datadog/mobile-react-native`) instead. Constructing
* it runs `datadogLogs.init` once (the global singleton does this on import,
* matching prior behavior).
*/
export declare class DatadogBrowserLogsTransport implements LogTransport {
constructor();
setEnv(environment: string): void;
setTrackingConsent(consent: TrackingConsent): void;
log({ level, title, context, error }: LogRecord): void;
}