It's not possible using any of the built-in patterns although it should be
simple enough to write your own:
// untestedpublic class AspNetRequestServerPatternConverter :
PatternLayoutConverter{ protected override void Convert(TextWriter writer,
LoggingEvent loggingEvent) { if (HttpContext.Current != null &&
HttpContext.Current.Request != null) {
writer.Write(HttpContext.Current.Request.ServerVariables[Option]); }
else { writer.Write(SystemInfo.NotAvailableText); }
}}
I'll look into adding something similar to /trunk
From: Shivinder Singh <[email protected]>
To: "[email protected]" <[email protected]>
Sent: Monday, March 7, 2016 10:30 AM
Subject: aspnetrequest server variables' values
<!--#yiv4690046978 .yiv4690046978hmmessage
P{margin:0px;padding:0px;}#yiv4690046978
body.yiv4690046978hmmessage{font-size:12pt;font-family:Calibri;}-->How/where
can I get the values of server variables logged by the aspnet-request
conversion pattern?
This is what I'm getting currently for my ASP.NET MVC application.
{ASP.NET_SessionId, ALL_HTTP, ALL_RAW, APPL_MD_PATH, APPL_PHYSICAL_PATH,
AUTH_TYPE, AUTH_USER, AUTH_PASSWORD, LOGON_USER, REMOTE_USER, CERT_COOKIE,
CERT_FLAGS, CERT_ISSUER, CERT_KEYSIZE, CERT_SECRETKEYSIZE, CERT_SERIALNUMBER,
CERT_SERVER_ISSUER, CERT_SERVER_SUBJECT, CERT_SUBJECT, CONTENT_LENGTH,
CONTENT_TYPE, GATEWAY_INTERFACE, HTTPS, HTTPS_KEYSIZE, HTTPS_SECRETKEYSIZE,
HTTPS_SERVER_ISSUER, HTTPS_SERVER_SUBJECT, INSTANCE_ID, INSTANCE_META_PATH,
LOCAL_ADDR, PATH_INFO, PATH_TRANSLATED, QUERY_STRING, REMOTE_ADDR, REMOTE_HOST,
REMOTE_PORT, REQUEST_METHOD, SCRIPT_NAME, SERVER_NAME, SERVER_PORT,
SERVER_PORT_SECURE, SERVER_PROTOCOL, SERVER_SOFTWARE, URL, HTTP_CONNECTION,
HTTP_ACCEPT, HTTP_ACCEPT_ENCODING, HTTP_ACCEPT_LANGUAGE, HTTP_COOKIE,
HTTP_HOST, HTTP_USER_AGENT}