AspResponse target
If you want to contribute, please create a user account and contact Jarek to get edit access.
Outputs log messages through the ASP Response object.
Supported in

Configuration Syntax
<targets>
<target xsi:type="AspResponse" name="String" addComments="Boolean" layout="Layout" />
</targets>
Read more about using the Configuration File.<target xsi:type="AspResponse" name="String" addComments="Boolean" layout="Layout" />
</targets>
Parameters
- General Options
- name - Name of the target.
- Layout Options
- addComments - Indicates whether to add <!-- --> comments around all written texts.Boolean
- layout - Layout used to format log messages.Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message}
Examples
This target is usable when using classic ASP (not ASP.NET). In order to use this target, put the following code in the configuration file which is loaded into the web server process:
<?xml version="1.0" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <targets> <target name="aspnet" xsi:type="ASPResponse" layout="${logger} ${message}" /> </targets> <rules> <logger name="*" minlevel="Debug" writeTo="aspnet" /> </rules> </nlog>




