C, C# and JavaScript implementations of the line #4
Loading…
Reference in a new issue
No description provided.
Delete branch "logline-c-dotnet-js"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
at-tmux (C), spirelens (C#) and the Node services can now write the estate's standard line. Each new implementation has the Go package's API in its own language's idiom and runs
testdata/golden.jsonandtestdata/redact.json.Added
c/:logline.h/logline.c, C99 with no dependencies (Windows API on Windows, POSIX elsewhere; local time with zone offset and milliseconds on both). It coverslogline_format,logline_parse, a file logger (open-append-close per line, 1 MiB rotation to.old,%LOCALAPPDATA%\<app>\<app>.logor an override variable), a stream logger andlogline_redact. It installs as a CMake package (logline::logline) so at-tmux can take it through a vcpkg overlay port the way it takes at-protocol. Its test reads both JSON files itself. Redact's credential shapes are hand-written matchers, because C has no regular expressions.dotnet/:RomaineLife.Logline(.NET 9, no packages):LogLine.Format/Parse/TryParse/Redact,Logger.Open/OpenFile,new Logger(TextWriter). xunit tests are in the rootlogline.sln.js/and the rootpackage.json:@romaine-life/logline, an ES module with no dependencies (format,parse,redact,Logger.open/file/stream), tested withnode --test. The release publishes it to Forgejo's npm registry, and services take it with an.npmrcand an exact pin.CMakeLists.txtandCMakePresets.json(thecipreset) for the cmake suite. README: usage and how each is consumed.Left alone: the Go package, the Rust crate and both case files.
CI: pipeline-templates PR 234 (merged) put the cmake (Linux and Windows), dotnet (Windows) and web-app suites on logline, so this PR runs every language's tests. Before pushing, each suite's own test script passed locally with those topics (
cmake/test.mjsunder MSVC/W4 /WX,dotnet/test.mjswith locked restore anddotnet format,web-app/test.mjs), andci-checkpassed. The C's POSIX branch was compiled for the first time by the cmake suite's Linux job (GCC,-Werror).Checked against Go beyond the golden files: I compared each implementation with the Go package on 200,000 random redact inputs, 200,000 format inputs and 400,000 parse inputs, all built from credential words, quotes, control characters and non-ASCII text. They agree except in two places:
strconv.Quotealso escapes non-printing characters that aren't control characters (U+00A0, U+200B, U+2028). C, C# and JS write these characters unescaped, as the Rust crate already does. Every parser reads both forms back to the same value.Work package: https://openproject.home.romaine.life/wp/AHT-204
🤖 Generated with Claude Code