Skip to content

Commit 11d58d9

Browse files
committed
docs: make README more natural (no em dashes), concise community intro, link for feedback/issues
1 parent b37b543 commit 11d58d9

1 file changed

Lines changed: 27 additions & 35 deletions

File tree

README.md

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66

77
**Modern C++ Structured Logging Library**
88

9-
---
10-
119
> **Async by default, chainable API, no macros.**
12-
> Extensible sinks, structured JSON out; robust thread lifecycle & lossless shutdown.
10+
> Extensible sinks, structured JSON out, robust thread lifecycle, and lossless shutdown.
1311
14-
---
12+
> [!IMPORTANT]
13+
> Like cLog? Please consider [starring the repo](https://github.com/mbn-code/cLog) or sharing your feedback. It really helps!
1514
1615
## Getting Started
1716

@@ -27,68 +26,61 @@ int main() {
2726
```
2827

2928
> [!IMPORTANT]
30-
> You must let the `Logger` object live until all events are logged. It flushes automatically when destructed (end of scope).
31-
32-
---
29+
> Let the `Logger` object live until all events are logged. It flushes automatically when the object is destroyed (which happens when it goes out of scope).
3330
3431
## Install
35-
Just add `include/` to your project. No dependencies outside C++17 STL and bundled nlohmann/json.
32+
Just add `include/` to your project. No dependencies except C++17 STL and the bundled nlohmann/json.
3633

3734
> [!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-
40-
---
35+
> If you're compiling on Windows, make sure your compiler supports at least C++17. See [CI status](https://github.com/mbn-code/cLog/actions) for tested environments.
4136
4237
## Features
4338
- Async and sync modes (`Logger::Mode`)
44-
- Automatic background flushing/shutdown
45-
- Console and file sink out-of-the-box
46-
- Fully structured logs (JSON)
47-
- Clean chainable API: `info().kv().kv()`
48-
- Robust: lossless, race-free, cross-platform tested
39+
- Safe, automatic background flushing and shutdown
40+
- Console and file sinks out of the box
41+
- Fully structured JSON logs
42+
- Clean, chainable API: `info().kv().kv()`
43+
- Lossless, race-free, and cross-platform
4944

5045
> [!TIP]
51-
> For highest multi-threading performance, prefer the default async mode.
46+
> For the best multithreaded performance, stick with the default async mode.
5247
5348
<details>
54-
<summary><strong>Advanced</strong>: Add your own sink/output</summary>
49+
<summary><strong>Advanced</strong>: Add a custom sink/output</summary>
5550

56-
Implement your own sink by inheriting from `c_log::Sink`:
51+
You can write your own sink by inheriting from `c_log::Sink`:
5752

5853
```cpp
5954
struct MySink : c_log::Sink {
6055
void log(const std::string& msg) override {
61-
// Custom output here
56+
// Custom output
6257
}
6358
};
6459
```
65-
Then add it to the logger:
60+
And then add it to the logger:
6661
```cpp
6762
log.add_sink(std::make_unique<MySink>());
6863
```
6964
</details>
7065

71-
---
72-
7366
## Issues and Contributing
74-
- Please [open an Issue](https://github.com/mbn-code/cLog/issues) for bugs, features, or questions!
75-
- Star the repo if you find it useful
76-
- [Contributing Guide](CONTRIBUTING.md)
77-
- See current and planned items below:
67+
- Please [open an Issue](https://github.com/mbn-code/cLog/issues) for bugs, feature ideas, or questions!
68+
- Star the repo if you find it useful.
69+
- See the [Contributing Guide](CONTRIBUTING.md).
70+
- You can also check out what's next below:
7871

7972
### Project Roadmap
80-
- [x] Robust async log draining/thread lifecycle
73+
- [x] Robust async log draining and thread lifecycle
8174
- [x] File and console sinks
8275
- [x] CI/test coverage (Linux/Ubuntu)
83-
- [ ] Easy external sink/plugin system
84-
- [ ] Windows, Mac CI runs
85-
- [ ] Clean config file support
86-
87-
---
76+
- [ ] More flexible external sink/plugin system
77+
- [ ] Windows and Mac CI
78+
- [ ] Simple config file support
8879

8980
## License
9081
MIT - see [LICENSE](LICENSE)
9182

92-
---
83+
*Project status: Alpha. The API will become more stable as people try it out and give feedback.*
9384

94-
*Project status: Alpha. API will stabilize with community use.*
85+
## Why cLog?
86+
I originally built cLog for myself. After a while, I realized other folks might want a modern C++ logger that's simple and just works (that's the goal, anyway! If it doesn't, please [open an issue](https://github.com/mbn-code/cLog/issues)). So, I decided to share it here. If it's useful to you, that's great. PRs and issues are always welcome!

0 commit comments

Comments
 (0)