mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-06 09:04:20 +00:00
Collect line framing, password redaction and oversized-line discard in one SslocalOutputIntake and dispatch redacted lines through a destination seam: stderr (freopen'd into agent.log, raw capture kept for ADR-0006 local viewing) and the unified log under category "sslocal", reusing the shared subsystem. Upstream free text is never routed through RuntimeLogEvent and is marked private in the unified log as a whole (ADR-0014 warns default upstream logs may contain server addresses). Levels derive from whitespace-separated upstream level tokens: ERROR maps to .error, WARN/WARNING maps to .default (unified logging has no warning level), and anything else maps to .info so the unified-log surface persists only detected problems while agent.log stays the persistent surface. The intake lives in Domain/Runtime so the hostless test mirror compiles it; unit tests drive raw chunks against fake destinations instead of parsing agent.log text. The 1 MiB agent.log retention policy deliberately stays on the file side shared with wrapper event lines.