Skip to content

Commit 1839c4e

Browse files
committed
Polish website documentation copy for release
1 parent 5875315 commit 1839c4e

File tree

6 files changed

+46
-48
lines changed

6 files changed

+46
-48
lines changed

site/docs/benchmarks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following tables summarize benchmark results as of `2026-02-10`.
1717

1818
> [!WARNING]
1919
>
20-
> These results should not be interpreted as an absolute ranking of libraries. The goal of these benchmarks was to make sure that `XenoAtom.Logging` is in the **right performance tier**, produces **zero allocations** and to track relative performance across versions as we optimize. Each library has different architectural trade-offs, so end-to-end call costs should be interpreted in the context of the specific benchmark scenarios and constraints.
20+
> Do not treat these results as an absolute ranking. The goal is to verify that `XenoAtom.Logging` stays in the right performance tier, remains zero-allocation on targeted paths, and tracks progress over time. Libraries make different architectural trade-offs, so interpret end-to-end costs within these benchmark constraints.
2121
2222
### Sync suite (`LoggingSyncBenchmarks`)
2323

@@ -152,7 +152,7 @@ Preset suite names:
152152

153153
Each category measures the same logical logging operation for each participating library.
154154

155-
Benchmark classes use explicit `SimpleJob` settings to keep runs stable and avoid unbounded auto-scaling of operations per iteration.
155+
Benchmark classes use explicit `SimpleJob` settings to keep runs stable and avoid unbounded auto-scaling per iteration.
156156

157157
## Fairness strategy
158158

@@ -162,10 +162,10 @@ To keep comparisons fair:
162162
- Each library is configured with an in-memory/no-op sink.
163163
- Enabled benchmarks still force each sink to consume the rendered message payload, so we measure logging + message materialization, not just level checks.
164164
- Disabled benchmarks use the same category names and thresholds across all libraries (`Bench.Enabled` and `Bench.Disabled`).
165-
- Async categories include only libraries with native asynchronous infrastructure and route payload lengths through an asynchronous consumer queue to compare call-site overhead under asynchronous sink pressure.
165+
- Async categories include only libraries with native asynchronous infrastructure and route payload lengths through an asynchronous consumer queue to compare call-site overhead under sink pressure.
166166
- Async consumer queues are bounded and drop on overflow to prevent unbounded memory growth from benchmark harness backpressure.
167167

168168
## Notes
169169

170-
- Different libraries have different internal architectures (sync vs async pipelines, template handling, interpolation handlers, etc.); results should be interpreted as *end-to-end call cost under equivalent benchmark constraints*, not as an absolute universal ranking.
170+
- Different libraries use different architectures (sync vs async pipelines, template handling, interpolation handlers, etc.); interpret results as *end-to-end call cost under equivalent constraints*, not as a universal ranking.
171171
- Run benchmarks on an idle machine and repeat multiple times before drawing conclusions.

site/docs/getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Getting Started"
44

55
# Getting Started
66

7-
This guide walks through a minimal setup, then shows the async and terminal variants.
7+
This guide starts with a minimal setup, then covers async mode and terminal output.
88

99
## 1. Install packages
1010

@@ -49,13 +49,13 @@ LogManager.Shutdown();
4949

5050
Key points:
5151

52-
- `Initialize` defaults to sync processing.
53-
- `GetLogger("App")` creates/gets a logger category.
52+
- `Initialize` defaults to synchronous processing.
53+
- `GetLogger("App")` resolves a logger category.
5454
- `Shutdown()` flushes and disposes writers.
5555

5656
## 3. Switch to asynchronous processing
5757

58-
When logging throughput is high, initialize for async:
58+
When throughput is high, initialize for async processing:
5959

6060
```csharp
6161
var config = new LogManagerConfig
@@ -81,8 +81,8 @@ LogManager.InitializeForAsync(config);
8181

8282
`OverflowMode` behavior:
8383

84-
- `Block` (default recommendation): preserve correctness, backpressure producers.
85-
- `Drop` / `DropAndNotify`: prioritize producer latency, allow loss.
84+
- `Block` (recommended default): preserve correctness and backpressure producers.
85+
- `Drop` / `DropAndNotify`: prioritize producer latency, but allow loss.
8686
- `Allocate`: temporarily exceed configured queue capacity.
8787

8888
## 4. Structured values and scopes

site/docs/log-formatter.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ title: "Log Formatters"
66

77
`XenoAtom.Logging` formats a `LogMessage` into text using `LogFormatter` implementations.
88

9-
Key goals:
9+
Goals:
1010

1111
- Zero allocations on the hot path.
1212
- Formatting into `Span<char>` (and optionally emitting segment metadata for styling).
1313
- User-defined text formats via source generation (`[LogFormatter]`).
1414
- Common formatter settings (`LevelFormat`, `TimestampFormat`) centralized on `LogFormatter`.
1515

16-
This page covers the user-facing API and common customization patterns. For implementation-level details, see the internal formatter spec (`site/docs/specs/formatter_specs.md`).
16+
This page covers user-facing APIs and customization patterns. For implementation-level details, see the internal formatter spec (`site/docs/specs/formatter_specs.md`) in the repository.
1717

1818
## Built-in formatters
1919

20-
The core package includes a few ready-to-use text formatters:
20+
The core package includes ready-to-use text formatters:
2121

2222
- `StandardLogFormatter` (single line: timestamp, level, logger name, optional event id, message, optional exception)
2323
- `CompactLogFormatter` (time, level, message)
24-
- `DetailedLogFormatter` (like standard + thread id and a sequence id)
24+
- `DetailedLogFormatter` (like standard plus thread id and sequence id)
2525

26-
There is also `JsonLogFormatter` which is not template-based and has different semantics (JSON lines for ingestion).
26+
`JsonLogFormatter` is also available. It is not template-based and targets JSON-line ingestion scenarios.
2727

2828
## Selecting a formatter
2929

@@ -75,7 +75,7 @@ var terminalWriter = new TerminalLogWriter(Terminal.Instance)
7575

7676
## Runtime customization
7777

78-
`LevelFormat` and `TimestampFormat` are inherited from `LogFormatter`. Template-generated formatters initialize these values in generated constructors, and you can still override them with `with { ... }`:
78+
`LevelFormat` and `TimestampFormat` are inherited from `LogFormatter`. Template-generated formatters initialize these values in generated constructors, and you can override them with `with { ... }`:
7979

8080
```csharp
8181
using XenoAtom.Logging;
@@ -88,7 +88,7 @@ var formatter = StandardLogFormatter.Instance with
8888
};
8989
```
9090

91-
Default `LevelFormat` is `Tri` (aligned 3-character levels like `INF`, `WRN`, `ERR`).
91+
The default `LevelFormat` is `Tri` (aligned 3-character levels such as `INF`, `WRN`, `ERR`).
9292

9393
`TimestampFormat` defaults to `"yyyy-MM-dd HH:mm:ss.fffffff"` unless changed by the formatter template (for example `{Timestamp:HH:mm:ss}`).
9494

@@ -113,7 +113,7 @@ var formatter = MyLogFormatter.Instance;
113113

114114
## Template syntax (user-facing)
115115

116-
Formatter templates look like a .NET composite format string, but the generator validates the template at compile time and produces a specialized `TryFormat(...)` implementation.
116+
Formatter templates look like .NET composite format strings. The generator validates templates at compile time and emits a specialized `TryFormat(...)` implementation.
117117

118118
### Literals and escaping braces
119119

@@ -162,7 +162,7 @@ Rules and behavior:
162162
- A conditional section starts with `{?` and ends with `?}`.
163163
- Conditional sections **cannot be nested**.
164164
- A conditional section must contain at least one field placeholder.
165-
- A conditional section is emitted only if **all emptyable fields referenced within the section are non-empty**.
165+
- A conditional section is emitted only if **all emptyable fields referenced in that section are non-empty**.
166166
- If a conditional contains no emptyable fields, the generator warns with `XLF0006` (it is always emitted).
167167

168168
Emptyable fields are:
@@ -177,7 +177,7 @@ All other fields are always considered present.
177177

178178
### Supported fields and format specifiers
179179

180-
Fields are case-insensitive and map to `LogMessage` data. This is a closed set.
180+
Fields are case-insensitive and map to `LogMessage` data. The set is closed.
181181

182182
| Field | Meaning | Format (`:...`) |
183183
|---|---|---|
@@ -246,7 +246,7 @@ logger.InfoMarkup("[green]ready[/]");
246246

247247
## Segments and terminal styling
248248

249-
Text formatters can optionally emit segment metadata (`LogMessageFormatSegments`) while formatting. This enables writers to style output by segment kind (timestamp/level/logger name, etc.).
249+
Text formatters can optionally emit segment metadata (`LogMessageFormatSegments`) while formatting. This lets writers style output by segment kind (timestamp/level/logger name, etc.).
250250

251251
`TerminalLogWriter` uses these segment kinds to apply styles:
252252

@@ -268,4 +268,4 @@ Common generator diagnostics:
268268
- `XLF0003`: invalid format specifier (e.g., `{Level:oops}` or `{Properties:sep=, }`).
269269
- `XLF0006`: conditional section is always emitted (no emptyable fields inside).
270270

271-
If you are consuming NuGet packages and the generator does not run, ensure you are using the .NET 10 SDK and that analyzers are enabled in your build. If you are using project references and analyzers are not flowing, add an explicit analyzer reference to `XenoAtom.Logging.Generators.csproj`.
271+
If you consume NuGet packages and the generator does not run, verify that you use the .NET 10 SDK and analyzers are enabled. If you use project references and analyzers are not flowing, add an explicit analyzer reference to `XenoAtom.Logging.Generators.csproj`.

site/docs/microsoft-extensions-logging.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This guide helps teams move from `Microsoft.Extensions.Logging` (MEL) patterns t
99
## Scope of compatibility
1010

1111
`XenoAtom.Logging` is not a MEL provider/bridge today.
12-
Migration is API-level: update application logging code and startup configuration.
12+
Migration is API-level: update startup configuration and logging call sites.
1313

1414
## Quick mapping
1515

@@ -110,8 +110,8 @@ logger.Info(
110110

111111
## Async behavior differences
112112

113-
MEL provider behavior depends on provider implementation.
114-
XenoAtom.Logging has explicit async queue settings:
113+
MEL provider behavior depends on each provider implementation.
114+
`XenoAtom.Logging` exposes explicit async queue settings:
115115

116116
- `InitializeForAsync(config)`
117117
- `AsyncLogMessageQueueCapacity`
@@ -123,7 +123,7 @@ Use `Block` when correctness is more important than producer latency.
123123
## Recommended migration strategy
124124

125125
1. Introduce `LogManager` startup/shutdown lifecycle.
126-
2. Replace logger injection with `Logger` access (`LogManager.GetLogger(...)`) in app entry points/services.
126+
2. Replace logger injection with `Logger` access (`LogManager.GetLogger(...)`) at app entry points/services.
127127
3. Migrate high-traffic logs first to `[LogMethod]` or interpolated APIs.
128128
4. Move sinks to `FileLogWriter`/`JsonFileLogWriter`/`TerminalLogWriter` as needed.
129129
5. Validate throughput and behavior with [Benchmarks](benchmarks.md) and app-specific load tests.

site/docs/readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ title: "User Guide"
44

55
# User Guide
66

7-
This guide gives you the practical map for using `XenoAtom.Logging` in production:
7+
This guide helps you adopt `XenoAtom.Logging` in production without getting overwhelmed:
88

9-
- start simple
10-
- choose sync or async behavior intentionally
11-
- add structure, sinks, and formatting progressively
9+
- Start with a minimal setup.
10+
- Choose sync or async behavior intentionally.
11+
- Add structure, sinks, and formatting incrementally.
1212

13-
If you are new to the library, start with [Getting Started](getting-started.md).
13+
If you are new to the library, begin with [Getting Started](getting-started.md).
1414

1515
## Installation
1616

@@ -81,9 +81,9 @@ logger.Info(
8181

8282
## Choosing sync vs async
8383

84-
Use sync mode when latency is low and writes are predictable.
84+
Use sync mode when sink I/O is low latency and predictable.
8585

86-
Use async mode when throughput is high or sink I/O can block:
86+
Use async mode when throughput is high or when sink I/O can block:
8787

8888
```csharp
8989
config.AsyncLogMessageQueueCapacity = 4096;
@@ -96,7 +96,7 @@ LogManager.InitializeForAsync(config);
9696
Overflow guidance:
9797

9898
- `Block`: safest for correctness (recommended default for critical logs).
99-
- `Drop` / `DropAndNotify`: lower producer latency, allows loss.
99+
- `Drop` / `DropAndNotify`: lower producer latency, but allow loss.
100100
- `Allocate`: temporary queue growth under pressure.
101101

102102
See [Shutdown Semantics](shutdown.md) and [Thread Safety](thread-safety.md) for operational behavior.

site/readme.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,20 @@ og_type: website
1010
<span class="c64-text">XenoAtom.Logging</span>
1111
</h1>
1212
<p class="lead mt-3 mb-4">
13-
A high-performance structured logging runtime for .NET.<br>
14-
Zero-allocation hot path, predictable async throughput, and rich terminal/UI rendering.
13+
High-performance structured logging for .NET.<br>
14+
Zero-allocation hot path, predictable async behavior, and rich terminal/UI output.
1515
</p>
1616
<div class="d-flex justify-content-center gap-3 mt-4 flex-wrap">
1717
<a href="{{site.basepath}}/docs/getting-started/" class="btn btn-primary btn-lg"><i class="bi bi-rocket-takeoff"></i> Get started</a>
1818
<a href="{{site.basepath}}/docs/" class="btn btn-outline-light btn-lg"><i class="bi bi-book"></i> Browse docs</a>
1919
<a href="https://github.com/XenoAtom/XenoAtom.Logging/" class="btn btn-info btn-lg"><i class="bi bi-github"></i> GitHub</a>
2020
</div>
21-
2221
<div class="row row-cols-1 row-cols-lg-2 gx-3 gy-3 mt-4 text-start mx-auto" style="max-width: 66rem;">
2322
<div class="col">
2423
<div class="card h-100">
2524
<div class="card-header h5"><i class="bi bi-box-seam xenoatom-feature-icon xenoatom-icon--input"></i>Core package</div>
2625
<div class="card-body">
27-
<p class="mb-2">Install <code>XenoAtom.Logging</code> for the core runtime, async processing, formatters, and file/JSON writers.</p>
26+
<p class="mb-2">Install <code>XenoAtom.Logging</code> for core runtime APIs, async processing, formatters, and file/JSON sinks.</p>
2827
<pre class="language-shell-session mb-0"><code>dotnet add package XenoAtom.Logging</code></pre>
2928
</div>
3029
</div>
@@ -33,15 +32,14 @@ og_type: website
3332
<div class="card h-100">
3433
<div class="card-header h5"><i class="bi bi-display xenoatom-feature-icon xenoatom-icon--controls"></i>Terminal package (optional)</div>
3534
<div class="card-body">
36-
<p class="mb-2">Add <code>XenoAtom.Logging.Terminal</code> for markup logs, rich segment styling, and <code>LogControl</code> support powered by <a href="https://xenoatom.github.io/terminal">XenoAtom.Terminal.UI</a>.</p>
35+
<p class="mb-2">Add <code>XenoAtom.Logging.Terminal</code> for markup logs, rich segment styling, and <code>LogControl</code> integration powered by <a href="https://xenoatom.github.io/terminal">XenoAtom.Terminal.UI</a>.</p>
3736
<pre class="language-shell-session mb-0"><code>dotnet add package XenoAtom.Logging.Terminal</code></pre>
3837
</div>
3938
</div>
4039
</div>
4140
</div>
42-
4341
<div class="mt-4">
44-
<p class="mb-2 text-white-50">Fullscreen <code>LogControl</code> demo (markup + structured logs + background producer):</p>
42+
<p class="mb-2 text-white-50"><code>LogControl</code> demo (markup + structured logs + background producer):</p>
4543
<video class="terminal img-fluid" autoplay muted loop playsinline preload="metadata" aria-label="XenoAtom.Logging LogControl demonstration">
4644
<source src="{{site.basepath}}/img/xenoatom-logcontrol.webm" type="video/webm">
4745
<img class="terminal img-fluid" src="{{site.basepath}}/img/screenshot.png" alt="XenoAtom.Logging terminal screenshot">
@@ -57,7 +55,7 @@ og_type: website
5755
<div class="card h-100">
5856
<div class="card-header h4"><i class="bi bi-lightning-charge xenoatom-feature-icon xenoatom-icon--actions"></i> Zero-allocation hot path</div>
5957
<div class="card-body">
60-
<p class="card-text mb-2">Interpolation handlers and generated logging methods minimize allocations in enabled logging paths.</p>
58+
<p class="card-text mb-2">Interpolation handlers and generated logging methods minimize allocations on enabled logging paths.</p>
6159
<p class="mb-0"><a href="{{site.basepath}}/docs/benchmarks/">Performance benchmarks</a></p>
6260
</div>
6361
</div>
@@ -66,25 +64,25 @@ og_type: website
6664
<div class="card h-100">
6765
<div class="card-header h4"><i class="bi bi-cpu xenoatom-feature-icon xenoatom-icon--layout"></i> Sync-first, async when needed</div>
6866
<div class="card-body">
69-
<p class="card-text mb-2">Use sync processing by default or switch to async with queue capacity and overflow policies (`Drop`, `Block`, `Allocate`).</p>
67+
<p class="card-text mb-2">Use sync processing by default, or switch to async with explicit queue capacity and overflow policies.</p>
7068
<p class="mb-0"><a href="{{site.basepath}}/docs/getting-started/">Getting started guide</a></p>
7169
</div>
7270
</div>
7371
</div>
7472
<div class="col">
7573
<div class="card h-100">
76-
<div class="card-header h4"><i class="bi bi-braces xenoatom-feature-icon xenoatom-icon--binding"></i> Structured + source-generated</div>
74+
<div class="card-header h4"><i class="bi bi-braces xenoatom-feature-icon xenoatom-icon--binding"></i> Structured + generated APIs</div>
7775
<div class="card-body">
78-
<p class="card-text mb-2">Log properties/scopes plus `[LogMethod]` and `[LogFormatter]` source generation for strongly-typed APIs.</p>
76+
<p class="card-text mb-2">Use properties/scopes with `[LogMethod]` and `[LogFormatter]` generation for strongly typed APIs.</p>
7977
<p class="mb-0"><a href="{{site.basepath}}/docs/source-generator/">Source generator docs</a> · <a href="{{site.basepath}}/docs/log-formatter/">Formatter docs</a></p>
8078
</div>
8179
</div>
8280
</div>
8381
<div class="col">
8482
<div class="card h-100">
85-
<div class="card-header h4"><i class="bi bi-file-earmark-text xenoatom-feature-icon xenoatom-icon--debug"></i> Production sinks</div>
83+
<div class="card-header h4"><i class="bi bi-file-earmark-text xenoatom-feature-icon xenoatom-icon--debug"></i> Production-ready sinks</div>
8684
<div class="card-body">
87-
<p class="card-text mb-2">File rolling, retention, failure handling, JSONL output, and runtime diagnostics for operations.</p>
85+
<p class="card-text mb-2">File rolling, retention, failure handling, JSONL output, and runtime diagnostics.</p>
8886
<p class="mb-0"><a href="{{site.basepath}}/docs/file-writer/">File and JSON writers</a></p>
8987
</div>
9088
</div>
@@ -102,7 +100,7 @@ og_type: website
102100
<div class="card h-100">
103101
<div class="card-header h4"><i class="bi bi-arrow-left-right xenoatom-feature-icon xenoatom-icon--themes"></i> Migration guidance</div>
104102
<div class="card-body">
105-
<p class="card-text mb-2">If you use <code>Microsoft.Extensions.Logging</code>, follow a practical migration path with equivalent patterns.</p>
103+
<p class="card-text mb-2">If you use <code>Microsoft.Extensions.Logging</code>, follow a practical migration path to equivalent patterns.</p>
106104
<p class="mb-0"><a href="{{site.basepath}}/docs/microsoft-extensions-logging/">Migration from MEL</a></p>
107105
</div>
108106
</div>

0 commit comments

Comments
 (0)