Skip to content

Commit 7e2e849

Browse files
committed
update read-me examples code
1 parent 3b3ce58 commit 7e2e849

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

ReadMe.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@
99
[![CSharp Version](https://img.shields.io/badge/CSharp-14-gray?style=for-the-badge)](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history)
1010
[![GitHub License](https://img.shields.io/github/license/falko-code/zero-logger?style=for-the-badge&color=gray)](License.md)
1111

12-
High-performance static structured logger with minimal allocations.
12+
**High-performance static structured logger with minimal allocations.**
1313

14+
## Quick Start
15+
16+
Create the example file:
17+
```C#
18+
vim example.cs
19+
```
20+
21+
Paste the following code:
1422
```C#
1523
#:package Falko.ZeroLogger.Targets.Console@0.10.0
1624
#:package Falko.ZeroLogger.Targets.File@0.10.0
@@ -29,16 +37,17 @@ using var loggerRuntime = new LoggerRuntime().Initialize(builder => builder
2937
LoggerConsoleTarget.Instance
3038
.AsConcurrent())
3139
.AddTarget(SimpleLogContextRenderer.Instance,
32-
new LoggerFileTarget("app_name", "./Logs")
40+
new LoggerFileTarget("example", "./logs")
3341
.AsConcurrent()));
3442

3543
var logger = typeof(Program).CreateLogger(loggerRuntime);
3644

3745
logger.Info("PI is {PI}", Math.PI);
3846
```
3947

48+
Run it:
4049
```bash
41-
dotnet run Example.cs
50+
dotnet run example.cs
4251
```
4352

4453
## Performance

0 commit comments

Comments
 (0)