|
1 | 1 | # cLog++ Changelog |
2 | 2 |
|
3 | | -## [v0.1.0] - 2026-02-10 |
| 3 | +All notable changes are documented in this file. |
| 4 | + |
| 5 | +## [v0.2.0] - 2026-06-09 |
4 | 6 | ### Added |
5 | | -- First public release: async by default, robust background log draining, JSON output. |
6 | | -- File/console sink, chainable API for log creation. |
7 | | -- Test suite for async flush, sync mode, file sink, and crash-avoidance. |
8 | | -- Modern, minimal, single-header main implementation. |
| 7 | +- Timestamp (`ts`, ISO-8601 UTC) and `level` fields in every JSON line. |
| 8 | +- Native JSON typing for fields: integers, unsigned integers, `double`, and `bool` |
| 9 | + are emitted unquoted (e.g. `{"n":42}`); `kv` gained overloads for these types and `const char*`. |
| 10 | +- `RotatingFileSink` (size-based rotation with a bounded number of backups). |
| 11 | +- `Logger::flush()` to block until everything submitted so far is written, plus a |
| 12 | + `Sink::flush()` hook (default no-op) honored on flush and destruction. |
| 13 | +- `clear_sinks()` to drop the default console sink, and a configurable async queue |
| 14 | + capacity via `Logger(Mode, capacity)`. |
| 15 | +- CMake build (`clogpp::clogpp` interface target), `ctest` integration, and CI on |
| 16 | + Linux, macOS, and Windows. |
| 17 | +- Regression tests for level filtering, async losslessness, JSON field shape, and rotation. |
9 | 18 |
|
10 | 19 | ### Fixed |
11 | | -- Thread shutdown is now completely lossless. The background logging thread always fully drains before the logger is destroyed. |
| 20 | +- **Level filtering now works.** `set_level()` was previously never consulted, so all |
| 21 | + levels were emitted regardless. |
| 22 | +- **Async logging is now lossless.** Earlier versions ignored the queue-full signal and |
| 23 | + silently dropped entries under load (a tight loop could lose the large majority of its |
| 24 | + logs), and the shutdown drain discarded entries. The queue now applies backpressure and |
| 25 | + drains completely before the worker exits. |
| 26 | +- **Concurrent logging is now safe.** Per-entry state moved onto a per-statement |
| 27 | + `LogRecord`, removing the shared mutable builder that races when multiple threads log |
| 28 | + on one `Logger`. |
| 29 | + |
| 30 | +### Changed |
| 31 | +- `info()`/`error()`/etc. now return a `LogRecord` (which emits when it goes out of |
| 32 | + scope) instead of `Logger&`. Existing chained usage — `log.info("e").kv("k", v);` — |
| 33 | + is unchanged. |
| 34 | +- Documentation no longer describes the async path as "lock-free"; it is a |
| 35 | + mutex-synchronized multi-producer queue. Benchmarks were re-measured end-to-end. |
12 | 36 |
|
13 | | ---- |
14 | | -All changes will be documented in this file. |
| 37 | +## [v0.1.0] - 2026-02-10 |
| 38 | +### Added |
| 39 | +- First public release: async-by-default logger with background draining and JSON output. |
| 40 | +- File/console sinks and a chainable API. |
| 41 | +- Initial test suite and CI. |
0 commit comments