Skip to content

Commit b37b543

Browse files
committed
docs: add GitHub-flavored admonition callouts, roadmap, advanced sink example, collapsible details
1 parent 1f63b47 commit b37b543

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@ int main() {
2626
}
2727
```
2828

29-
#### Install
29+
> [!IMPORTANT]
30+
> You must let the `Logger` object live until all events are logged. It flushes automatically when destructed (end of scope).
31+
32+
---
33+
34+
## Install
3035
Just add `include/` to your project. No dependencies outside C++17 STL and bundled nlohmann/json.
3136

37+
> [!CAUTION]
38+
> If compiling on Windows, ensure your compiler supports at least C++17. See [CI status](https://github.com/mbn-code/cLog/actions) for tested environments.
39+
3240
---
3341

3442
## Features
@@ -39,12 +47,42 @@ Just add `include/` to your project. No dependencies outside C++17 STL and bundl
3947
- Clean chainable API: `info().kv().kv()`
4048
- Robust: lossless, race-free, cross-platform tested
4149

50+
> [!TIP]
51+
> For highest multi-threading performance, prefer the default async mode.
52+
53+
<details>
54+
<summary><strong>Advanced</strong>: Add your own sink/output</summary>
55+
56+
Implement your own sink by inheriting from `c_log::Sink`:
57+
58+
```cpp
59+
struct MySink : c_log::Sink {
60+
void log(const std::string& msg) override {
61+
// Custom output here
62+
}
63+
};
64+
```
65+
Then add it to the logger:
66+
```cpp
67+
log.add_sink(std::make_unique<MySink>());
68+
```
69+
</details>
70+
4271
---
4372

4473
## Issues and Contributing
4574
- Please [open an Issue](https://github.com/mbn-code/cLog/issues) for bugs, features, or questions!
4675
- Star the repo if you find it useful
4776
- [Contributing Guide](CONTRIBUTING.md)
77+
- See current and planned items below:
78+
79+
### Project Roadmap
80+
- [x] Robust async log draining/thread lifecycle
81+
- [x] File and console sinks
82+
- [x] CI/test coverage (Linux/Ubuntu)
83+
- [ ] Easy external sink/plugin system
84+
- [ ] Windows, Mac CI runs
85+
- [ ] Clean config file support
4886

4987
---
5088

0 commit comments

Comments
 (0)