structured_log
Structured JSON logging for Dart — context binding, correlation
fields, processors, multi-sink routing. Zero dependencies beyond
meta. Usage & API ·
pub.dev.
A core library, an in-app log-viewer ecosystem, and — optionally — a
self-hosted server. Everything below works entirely on its own, with
no server involved at all; add structured_log_server only once you
want those logs collected centrally, searchable, and shared across a
team.
Add structured_log.
dependencies: structured_log: ^0.2.0Log.
import 'package:structured_log/structured_log.dart';
void main() { getLogger().info('user_login', context: {'user_id': 42});}Optionally, watch it live inside your own Flutter app — a headless core plus a ready-made Material/Fluent/Cupertino skin, entirely local, no network involved (full walkthrough: Embedding Guide).
Run the server. Starts structured_log_server and the admin
client behind one nginx — nothing else to install.
cd deploy && cp .env.example .env && ./deploy.shOpen http://localhost:8080 and sign in with the temporary password
printed to the server’s startup log (details:
Administrator Guide).
Create a project and a secret key. In the admin client: a group, a project inside it, then a secret key for that project — shown once, on creation (walkthrough with screenshots: User Guide).
Ship logs from your app.
import 'package:structured_log/structured_log.dart';import 'package:structured_log_http/structured_log_http.dart';
void main() { StructlogConfiguration.configure(sinks: [ LogSink(name: 'server', output: HttpLogOutput( serverUrl: 'https://logs.example.com', projectSecretKey: 'slk_...', // from step 2 )), ]);
getLogger().info('user_login', context: {'user_id': 42});}Entries show up live in the admin client’s log browser as they’re sent — no restart, no polling (details: Developer Guide).
structured_log
Structured JSON logging for Dart — context binding, correlation
fields, processors, multi-sink routing. Zero dependencies beyond
meta. Usage & API ·
pub.dev.
structured_log_flutter
A headless in-app log-viewer core for Flutter — a LogBuffer sink
and a filterable LogViewerController, no design-system lock-in.
Usage & API ·
pub.dev.
structured_log_material, structured_log_fluent, structured_log_cupertino
Three ready-to-use in-app log viewers on top of it — Material 3, Fluent UI, and Cupertino — each with search and filtering built in. Published on pub.dev.
structured_log_http
Ships log entries to structured_log_server over HTTP — batching,
retry with backoff, a bounded buffer. Used in the quick start above.
Usage & API. Not yet published.
structured_log_server
The self-hosted, multi-tenant server — ingests and stores your apps’ logs, lets you search and tail them live. SQLite or PostgreSQL.
structured_log_admin_client
The web app operators use day to day — dashboard, resource management, live log search, user management, audit log.
Details: Embedding Guide · User Guide · Administrator Guide · Developer Guide · Packages · Architecture