skip to content
[readonly]
==> README.md <==
1# @ajax/mesh-log
2
3meshd's log: `mesh_info` / `mesh_error` lines with a UTC `HH:MM:SS.mmm` stamp, written to stderr by a log thread so no caller (the driver thread included) ever waits on stderr. A bounded queue of 4096 lines: when it is full the line is dropped and counted (`mesh_log_dropped`, the status block's S_LOG_DROPPED). The last 1000 lines are kept for meshd's `log` request. `mesh_log_exit` flushes for at most 500 ms.
4
5## Ported from
6
7[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/log.rs.
8
9## Tests
10
11`tests/log.c`: the line format, the recent ring, and a reader-less pipe: emitting still returns at once and the drops are counted.
12
13## Licence
14
15MIT. See the repository's LICENSE.