Skip to content

Commit 820c972

Browse files
committed
Updated README.md with link to official docs
1 parent c5146e5 commit 820c972

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ Library for Stackify users to integrate Stackify in to their projects. Provides
99
- [Stackify homepage](http://www.stackify.com)
1010
- [Stackify documentation site](https://docs.stackify.com/docs)
1111
- [NuGet packages](https://www.nuget.org/packages?q=Stackify)
12-
- [Configure log4net](https://docs.stackify.com/docs/errors-and-logs-log4net)
12+
- [Supported .NET logging frameworks](https://docs.stackify.com/docs/errors-and-logs-net-supported-frameworks)
1313
- [Best practices for logging with C#](https://stackify.com/csharp-logging-best-practices/)
1414
- [Why you should use tags in your logs](https://stackify.com/get-smarter-log-management-with-log-tags/)
1515
- [Ultimate log4net Tutorial for .Net Logging](https://stackify.com/log4net-guide-dotnet-logging/)
1616

1717

18-
1918
**Read me sections:**
2019
- [Basics](#basics)
2120
- [Errors & Logs](#errors-and-logs)
@@ -101,17 +100,17 @@ If you log an object with the message, Stackify's log viewer makes it easy to se
101100
PM> Install-Package NLog.Targets.Stackify
102101
```
103102

104-
Sample config:
103+
**Sample config:**
105104
```xml
106105
<nlog>
107106
<extensions>
108107
<add assembly="NLog.Targets.Stackify"/>
109108
</extensions>
110109
<targets>
111-
<target name="stackify" type="StackifyTarget" logAllParams="false">
112-
<contextproperty name="gdcKey1" layout="${gdc:item=gdcKey1}" />
113-
<contextproperty name="mdlcKey2" layout="${mdlc:item=mdlcKey2}" />
114-
</target>
110+
<target name="stackify" type="StackifyTarget" logAllParams="false">
111+
<contextproperty name="gdcKey1" layout="${gdc:item=gdcKey1}" />
112+
<contextproperty name="mdlcKey2" layout="${mdlc:item=mdlcKey2}" />
113+
</target>
115114
</targets>
116115
<rules>
117116
<logger name="*" writeTo="stackify" minlevel="Debug" />
@@ -123,8 +122,8 @@ Sample config:
123122
NLog 4.5 (and newer) supports message templates, where structured properties becomes searchable in Stackify's log viewer
124123

125124
```csharp
126-
static NLog.Logger nlog = NLog.LogManager.GetCurrentClassLogger();
127-
nLog.Debug("{clientid} chose {color}", 1, "red");
125+
static NLog.Logger nlog = NLog.LogManager.GetCurrentClassLogger();
126+
nLog.Debug("{clientid} chose {color}", 1, "red");
128127
```
129128

130129
Logging custom objects are also supported and will be searchable in Stackify's log viewer
@@ -139,7 +138,7 @@ nlog.Debug("Test message", dictionary);
139138
nlog.Debug("Test message", new { clientid = 2, color = "blue" });
140139
```
141140

142-
Options:
141+
**Options:**
143142

144143
- IncludeEventProperties - Include LogEvent-Properties for structured logging.
145144
- IncludeMdlc - Include NLog MappedDiagnosticsLogicalContext MDLC-Properties for structured logging.
@@ -166,7 +165,7 @@ Note: Nuget packages are compiled against 2.0.0 (1.2.11) but any newer version w
166165
</dependentAssembly>
167166
```
168167

169-
Sample config:
168+
**Sample config:**
170169
```xml
171170
<log4net>
172171
<root>
@@ -193,7 +192,7 @@ Sample config:
193192
</log4net>
194193
```
195194

196-
Options
195+
**Options:**
197196

198197
- GlobalContext, ThreadContext, and LogicalThreadContext keys are fully supported by setting the parameters in the config as a comma delimited list of keys. See sample config above.
199198
- CallContextKeys is an additional feature unrelated to log4net that uses the local thread storage for more advanced tracking of context variables. LogicalThreadContext provides the same functionality but uses an internal property collection. We have seen instances where the serialization of that collection can cause exceptions. This was created as an alternative method to the built in function. It is used via CallContext.LogicalSetData(key, value). Research LogicalSetData online to learn more. It is supposed to work better across child Task objects and with async.
@@ -204,7 +203,7 @@ Options
204203

205204
log4net does not internally have methods for logging a log message along with an object. Stackify's appenders work fine if you log an object directly or we have created some friendly extension methods to make it easy to log an object with your message at the same time.
206205

207-
```cshapr
206+
```csharp
208207
using StackifyLib; //extension methods are here
209208
static log4net.ILog logger = log4net.LogManager.GetLogger(typeof(Program));
210209
Dictionary<string, object> dictionary = new Dictionary<string, object>();

0 commit comments

Comments
 (0)