${aspnet-application:variable=myvariable} - produces "123"
${aspnet-application:variable=anothervariable} - produces "01/01/2006 00:00:00"
${aspnet-application:variable=anothervariable:culture=pl-PL} - produces "2006-01-01 00:00:00"
${aspnet-application:variable=myvariable:padding=5} - produces " 123"
${aspnet-application:variable=myvariable:padding=-5} - produces "123 "
${aspnet-application:variable=stringvariable:upperCase=true} - produces "AAA BBB"
${aspnet-request:item=v}
${aspnet-request:querystring=v}
${aspnet-request:form=v}
${aspnet-request:cookie=v}
${aspnet-request:serverVariable=v}
${aspnet-session:variable=myvariable} - produces "123"
${aspnet-session:variable=anothervariable} - produces "01/01/2006 00:00:00"
${aspnet-session:variable=anothervariable:culture=pl-PL} - produces "2006-01-01 00:00:00"
${aspnet-session:variable=myvariable:padding=5} - produces " 123"
${aspnet-session:variable=myvariable:padding=-5} - produces "123 "
${aspnet-session:variable=stringvariable:upperCase=true} - produces "AAA BBB"
To set up the target in the configuration file, use the following syntax:
You can use a single target to write to multiple queues (similar to writing to multiple files with the File target).
The above examples assume just one target and a single rule. More configuration options are described here.
To set up the log target programmatically use code like this:
${longdate}|${level:uppercase=true}|${logger}|${message}
Typically this target is used in cooperation with PostFilteringTargetWrapper to provide verbose logging for failing requests and normal or no logging for successful requests. We need to make the decision of the final filtering rule to apply after all logs for a page have been generated.
To use this target, you need to add an entry in the httpModules section of web.config:
]]>
To set up the ASP.NET Buffering target wrapper configuration file, put
the following in
This assumes just one target and a single rule. More configuration options are described here.
To configure the target programmatically, put the following
piece of code in your
Fully working C# project can be found in the