neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证适用于 Dart 与 Flutter 的结构化日志软件,灵感来源于 Python 的 structlog —— JSON 日志并支持上下文绑定,应用内日志查看器(Material、Fluent、Cupertino),集成 bloc、dio、http、go_router 与 cherrypick,并提供可选的自托管日志服务器。
AI 翻译
Structured logging for Dart & Flutter, inspired by Python's structlog — JSON logs with context binding, in-app log viewers (Material, Fluent, Cupertino), integrations for bloc, dio, http, go_router and cherrypick, and an optional self-hosted log server.
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Читать на русском. Structured logging for Dart and Flutter — from a line in your app's console to a searchable, shared log store for your whole team. Inspired by Python's structlog. Documentation: structured-log.openidealab.com.查看完整 README ↗
Читать на русском.
Structured logging for Dart and Flutter — from a line in your app's console to a searchable, shared log store for your whole team.
Inspired by Python's structlog. Documentation: structured-log.openidealab.com.
A log line like "User 42 logged in from 127.0.0.1" is easy to write and
hard to use: you can't filter it by user, count it by IP, or follow one
request through it without regular expressions. structured_log records
events with data instead — user_login {user_id: 42, ip: 127.0.0.1} —
so the same entry reads well in a terminal, parses as JSON, and can be
searched by any field.
The project covers the whole path such an entry travels:
bloc, riverpod, dio,
http, go_router, auto_route and cherrypick already do in your app,
the queries of a drift database, every request a shelf server answers,
and a bridge for every library that logs through package:logging.Steps 1–3 work entirely inside your app, with no server at all. Step 4 is optional, and adding it doesn't change a single logging call.
log.info('user_login', context: {...});
bind() attaches fields to a logger (immutably), withCorrelation()
adds typed session/request/operation ids.DateTime, an exception) costs one field, not the entry.meta.LogBuffer, LogViewerController) to build your own UI.| Library | What gets logged | Category |
|---|---|---|
bloc / flutter_bloc | creation, events, transitions, errors, closing of every bloc and cubit | bloc |
riverpod / flutter_riverpod | creation, updates, failures, removal of every provider; a failure is logged once | riverpod |
dio | every request and its outcome, level by status code | http |
package:http | the same, as a wrapping http.Client, without buffering bodies | http |
go_router | navigation with route pattern, redirects, routing errors | navigation |
auto_route | navigation with route name and pattern, tab switches; tokens redacted | navigation |
cherrypick | DI scopes, modules, cycles, resolve errors — never an instance | di |
drift | every query with its SQL, duration and rows, slow ones flagged, failures with their stack — argument values off | db |
package:logging | every record of every library that logs through it, with its level, error and stack trace | logging |
shelf (server) | every request a server answers, level by status code; handlers get a logger bound to the request_id, returned in X-Request-Id | http |
HTTP and navigation adapters redact auth headers, cookies, and token-like
query parameters by default; bodies are off unless enabled, and masked by
field name when they are — except on the server, where structured_log_shelf
never writes them at all.
RemoteSyncLogOutput batches entries, retries with
backoff, caps its buffer, and never blocks the code that logged.admin/owner/user); JWT sessions with an HttpOnly refresh cookie
in the browser; rate limiting on the auth endpoints; an audit log of who
changed what.flowchart LR
subgraph app["Your Dart / Flutter app"]
A["Adapters<br/>bloc · riverpod · dio · http · go_router · auto_route · cherrypick · drift · logging · shelf"] --> C["structured_log"]
Y["Your code"] --> C
C --> O["Console / file"]
C --> V["In-app log viewer"]
C --> R["RemoteSyncLogOutput"]
end
R -- "HTTP, batched" --> S["structured_log_server<br/>SQLite or PostgreSQL"]
S -- "query API · SSE" --> W["Admin client (web)"]
Everything inside the box works on its own; the server side is added only when you want logs collected centrally.
Add the core library:
dart pub add structured_log
Log events with data:
import 'package:structured_log/structured_log.dart';
void main() {
final log = getLogger().bind({'service': 'checkout'});
log.info('user_login', context: {'user_id': 42, 'ip': '127.0.0.1'});
}
Ship the same entries to your server — alongside the console, without touching any logging call:
import 'package:structured_log/structured_log.dart';
import 'package:structured_log_remote_sync/structured_log_remote_sync.dart';
final output = RemoteSyncLogOutput(
serverUrl: 'https://logs.example.com',
projectSecretKey: 'slk_...',
);
StructlogConfiguration.configure(sinks: [
LogSink(name: 'console', output: coloredConsoleOutput),
LogSink(name: 'server', output: output, minLevel: LogLevel.info),
]);
Run the server and the admin client with docker-compose, then open
http://localhost:8080:
cd deploy && ./deploy.sh
Next steps: the Embedding Guide for the in-app viewer and adapters, the Administrator Guide for running the server, the User Guide for the admin client.
| Package | Purpose | |
|---|---|---|
structured_log | Core library | |
structured_log_flutter | Headless log-viewer core for Flutter | |
structured_log_material | Material 3 log viewer | |
structured_log_fluent | Fluent UI log viewer | |
structured_log_cupertino | Cupertino log viewer | |
structured_log_remote_sync | Ships logs to the server | |
The adapters are pre-releases. structured_log_http is the former name of
structured_log_remote_sync and is discontinued. The repository also holds
the admin client's component library
(structured_log_admin_ui) and
end-to-end tests across the whole system (packages/e2e).
The libraries are published and in use. The server and the admin client are working software — ingestion, search, live streaming, multi-tenancy, access control and auditing are all there — but not feature-complete: self-service registration, password recovery and email verification are specified and not built yet. Progress is tracked in openspec/changes/add-structured-log-server/tasks.md.
This is a Melos + FVM
workspace. Packages are grouped by kind: emb/ for libraries embedded in
apps, backend/ for the server, frontend/ for the admin client, and
packages/ for the end-to-end tests.
dart run melos bootstrap
dart run melos run lint
dart run melos run test
Start with the Contributor Guide; AGENTS.md is the full reference for commands, conventions, versioning and CI. Design decisions and requirements live in openspec/.
MIT — see LICENSE.
structured_log_blocbloc / flutter_bloc observer |
structured_log_riverpod | riverpod provider observer |
structured_log_dio | dio interceptor |
structured_log_http_client | package:http client wrapper |
structured_log_go_router | go_router navigation logging |
structured_log_auto_route | auto_route navigation logging |
structured_log_cherrypick | cherrypick DI observer |
structured_log_drift | drift query logging |
structured_log_logging | package:logging bridge |
structured_log_shelf | shelf request-logging middleware | not yet published |
structured_log_server | Self-hosted log server | service, not published |
structured_log_admin_client | Web admin for the server | app, not published |