You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
##Stackify API for .NET
1
+
##Stackify API for .NET
2
2
3
3
Library for Stackify users to integrate Stackify in to their projects. Provides support for sending errors, logs, and custom metrics to Stackify. Also some support for querying metric data back out of Stackify for use in external projects.
4
4
@@ -19,7 +19,7 @@ Library for Stackify users to integrate Stackify in to their projects. Provides
19
19
-[Direct API](#direct-api)
20
20
-[Configuring with Azure service definitions](#configuring-with-azure-service-definitions)
21
21
22
-
##Basics
22
+
##Basics
23
23
24
24
Several nuget packages are available for Stackify's core API as well as various logging frameworks. Please install the proper packages. All of the available packages for various logging frameworks are wrapper on top of StackifyLib which can also be used directly for logging.
25
25
@@ -73,12 +73,12 @@ If you are having problems you can get logging out of the framework by hooking i
73
73
74
74
Please note that Newtonsoft.Json is used by StackifyLib but is embedded as a resource to avoid version conflicts. Costura.Fody is being used to embed it. If you have any issues with Newtonsoft.Json as a result of using StackifyLib please contact Stackify support.
75
75
76
-
##Errors and Logs
76
+
##Errors and Logs
77
77
78
78
If you log an object with the message, Stackify's log viewer makes it easy to search by these parameters. You can always search by the text in the log message itself, but searching by the logged properties provides a lot more power. If you always logged a "clientid" for example on every log message, you could search in Stackify for "json.clientid:1" and quickly see all logs and errors affecting that specific client. Another big difference and advantage to logging objects is you can do a range type search "json.clientid:[1 TO 10]" which would not be possible by a straight text search.
79
79
80
80
81
-
###NLog 2.0.1.2 - v3.1+
81
+
###NLog 2.0.1.2 - v3.1+
82
82
83
83
**Install via NuGet package**
84
84
```
@@ -114,7 +114,7 @@ Options
114
114
- CallContextKeys is an additional feature unrelated to NLog that uses the local thread storage for more advanced tracking of context variables. 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.
115
115
- logMethodNames - Method names will show up in the StackifyLog viewer most of the time as the class name that did the logging. For exceptions it will usually show the method name. To enable the exact method name for all logging, set this property to true. Note that it does cause a small performance hit due to walking the StackTrace.
116
116
117
-
###log4net v2.0+ (v1.2.11+)
117
+
###log4net v2.0+ (v1.2.11+)
118
118
119
119
**Install via NuGet package**
120
120
```
@@ -161,7 +161,7 @@ Options
161
161
- logMethodNames - Method names will show up in the StackifyLog viewer most of the time as the class name that did the logging. For exceptions it will usually show the method name. To enable the exact method name for all logging, set this property to true. Note that it does cause a small performance hit due to walking the StackTrace.
162
162
163
163
164
-
####log4net Extension Methods
164
+
####log4net Extension Methods
165
165
166
166
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.
167
167
@@ -174,7 +174,7 @@ log4net does not internally have methods for logging a log message along with an
174
174
logger.Debug(dictionary); //This works fine and is indexed and searchable by Stackify
175
175
logger.Debug("Starting some process for client 1", dictionary); //extension method
Note: If you use 1.2.10 then you must use our special nuget package for that version. There is no way to use an assembly redirect because the public key of log4net v1 and v2 are different. Everything else is the same about using log4net with Stackify.
185
185
186
186
187
-
###Direct API
187
+
###Direct API
188
188
189
189
**Install via NuGet package**
190
190
```
@@ -209,7 +209,7 @@ If you use a custom logging framework or a framework not currently supported, yo
209
209
210
210
*Make sure you call StackifyLib.Logger.Shutdown() before your app ends to flush the queue*
211
211
212
-
###Configuring with Azure service definitions
212
+
###Configuring with Azure service definitions
213
213
214
214
StackifyLib reads the license key, app name, and environment settings from normal web.config appSettings. If you would prefer to store the settings in an [azure cloud deployment cscfg](http://msdn.microsoft.com/en-us/library/azure/hh369931.aspx#NameValue), then you can create a little code to read the settings from there and set the StackifyLib settings in code like this in some similar way.
0 commit comments