Skip to content

Commit 87696c9

Browse files
committed
refactor(documentation): update
1 parent c7451a3 commit 87696c9

32 files changed

Lines changed: 114 additions & 39 deletions

File tree

documentation/simplew/docs/.vitepress/config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default defineConfig({
4040
},
4141
//{ text: '📖✨ Features', link: '/features' },
4242
{
43-
text: 'v26.0-beta',
43+
text: 'v26.0-rc',
4444
items: [
4545
{ text: 'v16.1.0', link: 'https://simplew.net/v16/' },
4646
{ text: 'Changelog', link: '/version/changelog' },

documentation/simplew/docs/addons/chaos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ No external dependencies.
2424
## Installation
2525

2626
```sh
27-
$ dotnet add package SimpleW.Service.Chaos --version 26.0.0-beta.20260202-1339
27+
$ dotnet add package SimpleW.Service.Chaos --version 26.0.0-rc.20260202-1339
2828
```
2929

3030

documentation/simplew/docs/addons/firewall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Optional dependency if you enable GeoIP country filtering :
3030
## Installation
3131

3232
```sh
33-
$ dotnet add package SimpleW.Service.Firewall --version 26.0.0-beta.20260307-1526
33+
$ dotnet add package SimpleW.Service.Firewall --version 26.0.0-rc.20260309-1542
3434
```
3535

3636

documentation/simplew/docs/addons/hosting.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ It allows you to :
3535
Install the package from NuGet:
3636

3737
```sh
38-
$ dotnet add package SimpleW.Helper.Hosting --version 26.0.0-beta.20260307-1526
38+
$ dotnet add package SimpleW.Helper.Hosting --version 26.0.0-rc.20260309-1542
3939
```
4040

4141

@@ -165,6 +165,49 @@ Host.CreateApplicationBuilder(args)
165165
No changes are required in SimpleW itself.
166166

167167

168+
## Bridging SimpleW logging with Microsoft.Extensions.Logging
169+
170+
When using `SimpleW.Helper.Hosting`, you can forward the [**SimpleW internal logger**](../guide/logging.md) to the **Microsoft.Extensions.Logging** pipeline.
171+
172+
This allows SimpleW logs to be handled by the same logging providers used by the Generic Host (console, Serilog, OpenTelemetry, etc.).
173+
174+
To enable it, call the extension method `UseMicrosoftLogging()` on the `SimpleWHostApplicationBuilder`.
175+
176+
```csharp
177+
using Microsoft.Extensions.Hosting;
178+
using SimpleW;
179+
using SimpleW.Helper.Hosting;
180+
181+
var builder = SimpleWHost.CreateApplicationBuilder(args)
182+
.UseMicrosoftLogging();
183+
184+
builder.ConfigureSimpleW(server => {
185+
server.MapGet("/", () => {
186+
return new { message = "Hello world" };
187+
});
188+
});
189+
190+
var host = builder.Build();
191+
await host.RunAsync();
192+
```
193+
194+
### What this does
195+
196+
The bridge forwards every log produced by the SimpleW logging system to the `Microsoft.Extensions.Logging infrastructure`.
197+
198+
This means :
199+
- SimpleW logs appear in the **same output** as your application logs
200+
- All configured logging providers are used automatically
201+
- The **minimum log level configured in Microsoft logging is respected**
202+
203+
For example, with the default host configuration, logs will appear in the console :
204+
205+
```
206+
info: SimpleW.Server[0]
207+
Listening on http://0.0.0.0:8080
208+
```
209+
210+
168211

169212
## Design philosophy
170213

documentation/simplew/docs/addons/latency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ No external dependencies.
2626
## Installation
2727

2828
```sh
29-
$ dotnet add package SimpleW.Service.Latency --version 26.0.0-beta.20260307-1526
29+
$ dotnet add package SimpleW.Service.Latency --version 26.0.0-rc.20260309-1542
3030
```
3131

3232

documentation/simplew/docs/addons/letsencrypt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ It allows you to :
2929
## Installation
3030

3131
```sh
32-
$ dotnet add package SimpleW.Service.Letsencrypt --version 26.0.0-beta.20260307-1526
32+
$ dotnet add package SimpleW.Service.Letsencrypt --version 26.0.0-rc.20260309-1542
3333
```
3434

3535

documentation/simplew/docs/addons/log4net.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It allows you to :
2727
## Installation
2828

2929
```sh
30-
$ dotnet add package SimpleW.Helper.Log4net --version 26.0.0-beta.20260202-1339
30+
$ dotnet add package SimpleW.Helper.Log4net --version 26.0.0-rc.20260202-1339
3131
```
3232

3333

documentation/simplew/docs/addons/newtonsoft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For this reason, SimpleW provides an official alternative engine via the `Simple
2020
#### Installation
2121

2222
```sh
23-
$ dotnet add package SimpleW.JsonEngine.Newtonsoft --version 26.0.0-beta.20260307-1526
23+
$ dotnet add package SimpleW.JsonEngine.Newtonsoft --version 26.0.0-rc.20260309-1542
2424
```
2525

2626

documentation/simplew/docs/addons/openid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ It allows you to :
3232
## Installation
3333

3434
```sh
35-
$ dotnet add package SimpleW.Service.OpenID --version 26.0.0-beta.20260307-1526
35+
$ dotnet add package SimpleW.Service.OpenID --version 26.0.0-rc.20260309-1542
3636
```
3737

3838

documentation/simplew/docs/addons/razor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ It allows you to :
3030
## Installation
3131

3232
```sh
33-
$ dotnet add package SimpleW.Helper.Razor --version 26.0.0-beta.20260307-1526
33+
$ dotnet add package SimpleW.Helper.Razor --version 26.0.0-rc.20260309-1542
3434
```
3535

3636

@@ -120,7 +120,7 @@ namespace Sample {
120120
var server = new SimpleWServer(IPAddress.Any, 8080);
121121

122122
server.UseRazorModule(options => {
123-
options.Views = "Views" // path of your views folder
123+
options.ViewsPath = "Views"; // path of your views folder
124124
});
125125
server.MapControllers<RazorController>("/api");
126126

0 commit comments

Comments
 (0)