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 0.3.0 released

Counts and breakdowns for dashboards, typed action catalogs, a MySQL and MariaDB store, and in Logarithm Pro alerts to Slack and Teams plus anomaly detection for unusual exports, deletions and failed logins.

Logarithm
Release

Logarithm 0.1.0 released

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.

Logarithm
Release

Logarithm 0.2.0 released

Request context in one line, a compact activity feed for dashboards, and in Logarithm Pro signed checkpoints and legal holds.

Logarithm