Loggy Logs

Core SDK

@loggylogs/core is the framework-agnostic, headless client. It uses a named Firebase app and never touches your default Firebase app.

import { createClient } from '@loggylogs/core'

const client = createClient({ publicKey: 'pk_your_public_key' })
const page = await client.fetchLogs({ limit: 20 })

const unsubscribe = client.subscribeLogs((logs) => {
    renderChangelog(logs)
})

// Later
unsubscribe()
client.destroy()

Pagination

Pass the returned opaque cursor into the next call. Limits are clamped from 1 to 50. Optional from and todates narrow the published window.

Seen state

client.seen stores the latest seen timestamp in local storage, handles unavailable storage safely, and synchronizes tabs.

Errors

Catch LoggyLogsError and inspect its stable code:invalid-public-key, unavailable,invalid-cursor, or internal.