-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
135 lines (127 loc) · 6.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Serilog — simple .NET logging with fully-structured events</title>
<link rel="stylesheet" type="text/css" href="theme/normalize.css" />
<link href='//fonts.googleapis.com/css?family=Reenie+Beanie|Fira+Sans:500|Noto+Serif|Inconsolata' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="theme/grid.css" />
<link rel="stylesheet" type="text/css" href="theme/util.css" />
<link rel="stylesheet" type="text/css" href="theme/layout.css" />
<link rel="stylesheet" type="text/css" href="theme/design.css" />
<link rel="shortcut icon" href="favicon.png" type="image/png" >
</head>
<body>
<header>
<div class="container">
<div class="row clearfix">
<div class="column two-thirds">
<h1>Flexible, structured events — log file convenience.</h1>
</div>
<div class="column third">
<div id="banner-logo"></div>
</div>
</div>
</div>
</header>
<section>
<div class="container">
<div class="row clearfix">
<div class="column full">
<h2>Why Serilog?</h2>
<p>Like many other libraries for .NET, Serilog provides diagnostic
logging to files, the console, and
<a href="https://github.com/serilog/serilog/wiki/Provided-Sinks">
elsewhere</a>. It is easy to set up,
has a clean API, and is portable between recent .NET platforms.</p>
<p><em>Unlike</em> other logging libraries, Serilog is built with
powerful <em>structured event data</em> in mind.</p>
</div>
</div>
</div>
</section>
<section>
<div class="container">
<div class="row clearfix">
<div class="column full">
<h3>Text formatting with a twist</h3>
<p>Serilog <em>message templates</em> are a simple DSL extending
.NET format strings. Parameters can be named, and their values
are serialized as properties on the event for incredible searching
and sorting flexibility:</p>
<div class="pre"><span class="keyword">var</span> position = <span class="keyword">new</span> { Latitude = <span class="number">25</span>, Longitude = <span class="number">134</span> };
<span class="keyword">var</span> elapsedMs = <span class="number">34</span>;
log.Information(<span class="string">"Processed <span class="token">{@Position}</span> in <span class="token">{Elapsed:000}</span> ms."</span>, position, elapsedMs);</div>
<p>This example records two properties, <code>Position</code> and
<code>Elapsed</code> along with the log event. The properties
captured in the example, in JSON format, would appear like:</p>
<div class="pre">{"Position": {"Latitude": 25, "Longitude": 134}, "Elapsed": 34}</div>
<p>The <code>@</code> operator in front of <code>Position</code>
tells Serilog to serialize the object passed in,
rather than convert it using <code>ToString()</code>.</p>
<p>The <code>:000</code> segment following <code>Elapsed</code> is a
standard .NET format string
that affects how the property is rendered. The console
sink included with Serilog will display the above message as:</p>
<div class="pre">09:14:22 [Information] Processed { Latitude: 25, Longitude: 134 } in 034 ms.</div>
</div>
</div>
</div>
</section>
<section>
<div class="container">
<div class="row clearfix">
<div class="column half">
<h3>Documentation</h3>
<p>You'll find heaps of information and advice about using Serilog on
the project site:</p>
<ul>
<li><a class="highlight" href="https://github.com/serilog/serilog/wiki/Getting-Started">Installation</a></li>
<li><a href="https://github.com/serilog/serilog/wiki/Configuration-Basics">Configuration basics</a></li>
<li><a href="https://github.com/serilog/serilog/wiki/Writing-Log-Events">Writing log events</a></li>
<li><a href="https://github.com/serilog/serilog/wiki/Structured-Data">Structured data</a></li>
<li><a href="https://github.com/serilog/serilog/wiki/Provided-Sinks">Provided sinks</a></li>
<li><a href="https://github.com/serilog/serilog/wiki/Debugging-and-Diagnostics">Debugging and diagnostics</a></li>
</ul>
</div>
<div class="column half">
<h3>Resources</h3>
<ul>
<li><a href="https://github.com/serilog/serilog">GitHub project</a></li>
<li><a href="https://stackoverflow.com/questions/tagged/serilog"><code>serilog</code> tag on Stack Overflow</a></li>
<li><a href="http://nblumhardt.com">Blog posts at nblumhardt.com</a></li>
<li><a href="https://nuget.org/packages?q=Tags%3A%22serilog%22">Packages on NuGet</a></li>
<li><a href="https://github.com/serilog/serilog-aspnetcore">Serilog integration for ASP.NET Core 2+</a></li>
<li><a href="https://gitter.im/serilog/serilog">Gitter chat</a></li>
</ul>
</div>
</div>
</div>
</section>
<section class="ribbon">
<div class="container">
<div class="row clearfix">
<div class="column full">
<p><a href="http://pluralsight.com/training/Courses/TableOfContents/modern-structured-logging-serilog-seq">
Dive in deeper with this great Serilog course on <img class="pluralsight" alt="Pluralsight" src="img/pluralsight-light.png" /></a></p>
</div>
</div>
</section>
<footer>
<div class="container">
<div class="row clearfix">
<div class="column full">
<p>Serilog is open source software under the
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>
license, copyright © and maintained by its
<a href="https://github.com/serilog/serilog/contributors">contributors</a>.</p>
</div>
</div>
</div>
</footer>
<script src="js/rem.js" type="text/javascript"></script>
</body>
</html>