10
Vote

Log4Net Logger should output additional information

description

URL, Referrer, and Tenant name would be helpful.

It's the kind of update that does belong in core. I don't see a reason that it should be a module extension. There's no reason why anyone wouldn't want that information.

Discussion posted here as well: http://orchard.codeplex.com/discussions/429913

file attachments

comments

morrisonbrett wrote Jan 18 at 2:08 AM

Updated core to support logging of additional properties. If the extended properties are available at the time of logging, they are set as available to the logging appender.

Commit message from attached patch:

Work Item: http://orchard.codeplex.com/workitem/19401
Added logging of Request Url, Referring Url, Tenant Name, if those properties are available, they're part of
the log4net stream. To use them in log4net config, use the %P{propertyname} token which is the token for custom property.
Properties added:
    %P{Url}
    %P{HttpReferer} NOTE: misspelling is acknowledged http://en.wikipedia.org/wiki/HTTP_referer
    %P{Tenant}

TheMonarch wrote Feb 26 at 12:28 PM

Has this work item gone through triage yet? If so, when will this patch be integrated?

BertrandLeRoy wrote Feb 26 at 4:07 PM

It hasn't: it's still Proposed/Unassigned.

BertrandLeRoy wrote Feb 26 at 5:42 PM

There is a patch, this is useful and proven to work in at least one production environment. We should take this.

TheMonarch wrote Feb 26 at 8:34 PM

I've also been running the patch in prod since this morning. No issues yet.

mberacochea wrote Apr 5 at 3:45 PM

Just applied the patch to in 1.5.1 and seems to work correctly. Great debug information.

morrisonbrett wrote Apr 5 at 5:24 PM

Glad you like it. It's great especially for multi-node environments.