You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Shahid Majeed (JIRA)" <ji...@apache.org> on 2018/12/03 12:59:00 UTC

[jira] [Created] (LOG4NET-617) Logging IP address of incoming request for multiple thread.

Shahid Majeed created LOG4NET-617:
-------------------------------------

             Summary: Logging IP address of incoming request for multiple thread.
                 Key: LOG4NET-617
                 URL: https://issues.apache.org/jira/browse/LOG4NET-617
             Project: Log4net
          Issue Type: Bug
          Components: Layouts
    Affects Versions: 2.0.8
            Reporter: Shahid Majeed
             Fix For: 2.0.8


Hi,

I am trying to log the ip address of incoming request. For logging i am using log4net 2.0.8.

I used Application_BeginRequest method in global.asax to save the ip address of incoming request. However it seems like not working for multiple thread for same user.

 
{code:java}
// code placeholder
void Application_BeginRequest(object sender, EventArgs e)

{ log4net.ThreadContext.Properties["addr"] = Request.UserHostAddress; }
{code}
logs look like
{code:java}
// code placeholder
213.136.59.97 2018-11-30 07:35:33,561 [14] DEBUG Conference - Kitty:  visaBoka LoadPrintTimeline end: 
(null) 2018-11-30 07:36:37,968 [32] DEBUG Conference - Kitty: Statistik  btnVisa_Click started{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)