Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
MCP server exposing rlg log streams to LLM agents via JSON-RPC 2.0 over stdio.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"rlg": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/sebastienrousseau/rlg-mcp:0.0.18"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add rlg -- docker run -i --rm ghcr.io/sebastienrousseau/rlg-mcp:0.0.18วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"rlg": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/sebastienrousseau/rlg-mcp:0.0.18"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"rlg": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/sebastienrousseau/rlg-mcp:0.0.18"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 9 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub sebastienrousseau ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.0.18) เข้า registry เมื่อวานซืน
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
rlg
Near-lock-free structured logging for Rust: records leave the application thread with a few atomic operations and are formatted and written by a background flusher.
Getting started
cargo install for the CLIs and the MCP serverThe rlg ecosystem
rlg, rlg-cli, rlg-report, rlg-mcp, rlg-otlp, rlg-redact, rlg-tower, rlg-test, rlg-wasm, rlg-ebpfLibrary reference
docs/COMPARISON.mddocs/BENCHMARKS.mdOperational
[dependencies]
rlg = "0.0.18"
Satellites install the same way, all at the same version:
[dependencies]
rlg-otlp = "0.0.18" # ship records to an OpenTelemetry Collector rlg-tower = "0.0.18" # per-request access logs for tower services rlg-redact = "0.0.18" # scrub secrets and PII before they are written
[dev-dependencies] rlg-test = "0.0.18" # assert on captured records in tests
cargo install rlg-cli # `rlg`: filter and convert log files
cargo install rlg-report # rlg-report: summaries by level, component and message cargo install rlg-mcp # rlg-mcp: log files as tools for AI agents
From a checkout, make install builds the three binaries and installs them with their manpages and bash, zsh and fish completions under /usr/local (PREFIX and DESTDIR are honoured; make uninstall reverses it). The binaries generate both themselves: rlg --manpage > rlg.1, rlg --completions zsh > _rlg.
rlg-mcp is also published as a container image, ghcr.io/sebastienrousseau/rlg-mcp, and listed in the MCP registry.
os_log, journald). Everywhere else, including Windows, rlg writes to a file or stdout.use rlg::log::Log;
use rlg::log_format::LogFormat;
fn main() { // Keep the guard for the life of the program: dropping it flushes // pending records and stops the background thread. let _guard = rlg::init().unwrap();
Log::info("User authenticated") .component("auth-service") .with("user_id", 42) .format(LogFormat::JSON) .fire(); }
fire() checks the level, pushes the record into a ring buffer and returns; the flusher thread formats it as JSON and writes it to the platform sink. This block is compiled and run by cargo test.
Ten crates at lockstep version 0.0.18, released together.
| Component | Purpose | Use case | |
|---|---|---|---|
rlg | The engine: 65,536-slot ring buffer, background flusher, 14 formats, native sinks | Structured logging in any Rust program | |
rlg-cli | The rlg binary: filter by level, component or attribute, convert between formats | `my-service \ | rlg --min-level error --format ecs` |
rlg-report | The rlg-report binary and library: counts by level and component, top messages, latency percentiles | On-call triage, daily error digests | |
rlg-mcp | MCP server: four tools, one prompt, two resources over stdio, streamable HTTP or HTTP+SSE | AI agents reading production logs | |
rlg-otlp | OTLP/HTTP exporter to a local OpenTelemetry Collector | Honeycomb, Datadog, Grafana through a Collector | |
rlg-redact | Scrubs cards, JWTs, bearer tokens, emails, IPv4 addresses and AWS keys in one pass | GDPR and audit-trail safety | |
rlg-tower | tower::Layer emitting one access-log record per request | axum, hyper and other tower services | |
rlg-test | Capture records in a test and assert on them | Libraries testing their own log output | |
rlg-wasm | wasm-bindgen bindings and a WASI 0.2 component interface | Browsers, Deno, Workers, wasmtime hosts | |
rlg-ebpf | Process enrichment, portable; an eBPF enricher scaffold on Linux | Host context on every record |
| Area | Capability | Status |
|---|---|---|
| Ingestion | Atomic level filter, ring-buffer push, no lock on the caller's thread | Stable |
| Formats | JSON, NDJSON, ECS, GELF, Logstash, OTLP, MCP, logfmt, CLF, CEF, ELF, W3C, Apache, Log4j XML | Stable |
| Sinks | os_log (macOS), journald (Linux), file, stdout | Stable |
| Sinks | io_uring file sink (Linux, uring feature) | Scaffold |
| Configuration | TOML load, validation, polling hot-reload (tokio feature) | Stable |
| Bridges | log facade via rlg::init(); tracing layer (tracing-layer feature) | Stable |
| Export | OTLP/HTTP to a local Collector (rlg-otlp) | Stable |
| Agents | MCP server over stdio, streamable HTTP and HTTP+SSE (rlg-mcp) | Stable |
| Enrichment | eBPF kernel context (rlg-ebpf, Linux) | Scaffold |
rlg trades tracing's span model for an event-only engine that keeps formatting and I/O off the application thread and ships native sinks, many formats and an agent interface in the box.
| Project | Formatting off the caller's thread | Built-in formats | Native journald / os_log |
|---|---|---|---|
| rlg | yes | 14 | yes |
tracing + tracing-subscriber | add-on | text, JSON | add-on |
slog | add-on | add-on | add-on |
log + env_logger | no | text | no |
See docs/COMPARISON.md for the evidence and complete matrix.
The competitive_bench suite times rlg's fire() against tracing::info! and log::info! for single records, records with attributes, 10,000-record bursts and latency distribution. It runs in CI on every release tag, and its results are published as workflow artifacts.
| Scenario | Result | Environment |
|---|---|---|
rlg fire(), one record | 598 ns | GitHub-hosted ubuntu-latest, release profile |
tracing::info! to a discarding writer | 591 ns | same run |
rlg fire() with 3 attributes | 947 ns (tracing: 1,117 ns) | same run |
On the calling thread rlg now costs about what tracing costs, without formatting there; what it buys is that the caller never waits on the sink's I/O.
See docs/BENCHMARKS.md for methodology and full results.
Everything optional is off by default.
| Feature | Crate | Adds |
|---|---|---|
tokio | rlg | Config::load_async and polling hot-reload |
tui | rlg | A live terminal dashboard, started with RLG_TUI=1 |
tracing-layer | rlg | RlgLayer, a tracing_subscriber::Layer |
fast-queue | rlg | An eight-shard ring buffer for many concurrent producers |
uring | rlg | The io_uring file sink on Linux |
async | rlg-otlp | AsyncOtlpExporter on Tokio |
Config loads from TOML, validates, and creates the log paths it needs.
# rlg.toml
version = "1.0" profile = "production" log_file_path = "/var/log/rlg.log" log_level = "INFO" logging_destinations = [ { type = "File", value = "/var/log/rlg.log" }, { type = "Stdout" }, ] log_rotation = { Size = 10485760 } # 10 MiB
Load it with Config::load(Some("rlg.toml")), or with the tokio feature Config::load_async, and follow edits with Config::hot_reload_async. RUST_LOG sets the level too. The crate README lists every field.
| Example | Shows | Run |
|---|---|---|
example_log_format | All 14 formats side by side | cargo run -p rlg --example example_log_format |
example_config | TOML config, async load, hot-reload | cargo run -p rlg --example example_config --features tokio |
example_macros | The logging macros | cargo run -p rlg --example example_macros |
serve_a_session | A full MCP session against rlg-mcp | cargo run -p rlg-mcp --example serve_a_session |
honeycomb | Exporting through a local Collector | cargo run -p rlg-otlp --example honeycomb |
CI runs every example on each pull request (examples-smoke.yml), except example_config and example_utils, async demos whose behaviour the crate's own tests cover.
tracing directly; rlg's layer only bridges its events.FlushGuard drops loses what is still buffered.0.0.x: any rตัดมาแค่ช่วงต้น อ่านต่อใน repo