Skip to main content
Introducing packages.sweber.dev
All posts
Release1 min read

Logarithm 0.4.0 released

French and Italian for the activity log, and in Logarithm Pro an S3 and Cloudflare R2 archive for expired events plus log entries that prove your retention policy and erasures actually ran.

By Seya Weber

Logarithm 0.4.0 is out. @sweberdev/logarithm and @sweberdev/logarithm-react are on npm, and the Logarithm Pro packages are updated for all customers. Nothing breaks: 0.3.0 code keeps working as it is.

French and Italian

Switzerland has four languages, and your customers' admins read the activity log in theirs. The React views now ship fr and it labels next to en and de, and describeAction() builds the sentences with the right quotation marks:

<AuditLog locale="fr-CH" nouns={{ project: "le projet" }} fetcher={fetchEvents} />
// Anna Muster a modifié le projet « Website »
describeAction(event, { locale: "it-CH", nouns: { project: "il progetto" } })
// "ha modificato il progetto «Website»"

French and Italian nouns need their article (le projet, il progetto), so you pass them with nouns. The React guide has the details, and the live demo now switches between all four languages.

Logarithm Pro 0.4.0

  • Archive to S3 or Cloudflare R2. s3Archive() writes every batch of expired events as gzipped NDJSON before they are deleted. It works with AWS S3, R2, Exoscale, Infomaniak, MinIO and other S3-compatible stores, signs requests with Web Crypto and needs no AWS SDK. A failed upload throws, so nothing is deleted without its archive.
  • Proof that retention ran. Pass your audit log as recordTo and applyRetention records audit_log.retention_applied per tenant, while eraseActor records audit_log.actor_erased with the pseudonym, never the original id. When an auditor asks whether your deletion periods are applied, the log answers.
const archive = s3Archive({
  bucket: "audit-archive",
  endpoint: `https://${process.env.R2_ACCOUNT}.r2.cloudflarestorage.com`,
  accessKeyId: process.env.R2_KEY!,
  secretAccessKey: process.env.R2_SECRET!,
})

await applyRetention(store, tenantIds, { keep: "13m", archive, recordTo: audit })

Update

pnpm add @sweberdev/logarithm@latest @sweberdev/logarithm-react@latest

Pro customers update @weber-development/logarithm-retention the same way. Logarithm Pro is available on the package page and is part of the Compliance Bundle.

Package in this post

Logarithm

A self-hosted audit log for SaaS apps: who changed what, and when. Field-level diffs in your own Postgres or SQLite, and a ready React view for your customers' admins.

pnpm add @sweberdev/logarithm @sweberdev/logarithm-react
View package

Related posts

Release

Logarithm Pro 0.5.0 released

Trusted RFC 3161 timestamps for integrity checkpoints, and a retention report with the legal basis per tenant that you can hand to an auditor as CSV or a printable page.

Logarithm
Release

Logarithm Pro 2.1 released

A ready-to-run admin server with search and export for your customers' admins, and anomaly alerts for mass changes, off-hours permission changes and new IP addresses.

Logarithm
Release

Logarithm 2.0 released

Failed and denied actions in the log, correlation ids, CloudEvents and OpenTelemetry mappings, Postgres partitioning and an object history view. Logarithm Pro adds SOC 2 and ISO 27001 control evidence, monthly evidence packs and read-only access for auditors.

Logarithm