AspNetRequestUrlRenderer Class |
Namespace: NLog.Web.LayoutRenderers
The AspNetRequestUrlRenderer type exposes the following members.
Name | Description | |
---|---|---|
AspNetRequestUrlRenderer | Initializes a new instance of the AspNetRequestUrlRenderer class |
Name | Description | |
---|---|---|
HttpContextAccessor |
Provides access to the current request HttpContext.
(Inherited from AspNetLayoutRendererBase.) | |
IncludeHost | Obsolete.
To specify whether to exclude / include the host. Default is true.
| |
IncludePath | Obsolete.
To specify whether to exclude / include the url-path. Default is true.
| |
IncludePort | Obsolete.
To specify whether to include / exclude the Port. Default is false.
| |
IncludeQueryString | Obsolete.
To specify whether to include / exclude the Query string. Default is false.
| |
IncludeScheme | Obsolete.
To specify whether to exclude / include the scheme. Ex. 'http' or 'https'. Default is true.
| |
LoggingConfiguration |
Gets the logging configuration this target is part of.
(Inherited from LayoutRenderer.) | |
Properties |
A flags enumeration that controls which of the five portions of the URL are logged.
Defaults to scheme://host/path, port and query string are by default not logged.
| |
UseRawTarget |
To specify whether to use raw path and full query. Default is false.
See https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.features.ihttprequestfeature.rawtarget
| |
ValueFormatter |
Value formatter
(Inherited from LayoutRenderer.) |
Name | Description | |
---|---|---|
Append |
Validates that the HttpContext is available and delegates append to subclasses.StringBuilder.
(Inherited from AspNetLayoutRendererBase.) | |
CloseLayoutRenderer |
Closes the layout renderer.
(Inherited from AspNetLayoutRendererBase.) | |
DoAppend |
Renders the value of layout renderer in the context of the specified log event into StringBuilder.
(Overrides AspNetLayoutRendererBaseDoAppend(StringBuilder, LogEventInfo).) | |
GetCulture |
Get the CultureInfo for rendering the messages to a String (Inherited from LayoutRenderer.) | |
GetFormatProvider |
Get the IFormatProvider for rendering the messages to a String (Inherited from LayoutRenderer.) | |
InitializeLayoutRenderer |
Initializes the layout renderer.
(Inherited from LayoutRenderer.) | |
Render |
Renders the value of layout renderer in the context of the specified log event.
(Inherited from LayoutRenderer.) | |
ResolveServiceT |
Resolves the interface service-type from the service-repository
(Inherited from LayoutRenderer.) | |
ToString | Returns a string that represents the current object. (Inherited from LayoutRenderer.) |
1${aspnet-request-url:IncludeQueryString=true} - produces http://www.example.com/?t=1 2${aspnet-request-url:IncludeQueryString=false} - produces http://www.example.com/ 3${aspnet-request-url:IncludePort=true} - produces http://www.example.com:80/ 4${aspnet-request-url:IncludePort=false} - produces http://www.example.com/ 5${aspnet-request-url:IncludeScheme=false} - produces www.example.com/ 6${aspnet-request-url:IncludePort=true:IncludeQueryString=true} - produces http://www.example.com:80/?t=1