File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 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
3543var logger = typeof (Program ).CreateLogger (loggerRuntime );
3644
3745logger .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
You can’t perform that action at this time.
0 commit comments