How to Log Client Ip, Browser Name and User Name using Log4net in asp.net?
I want to log Client IP Address, Browser Name and Windows Authenticated User Name using log4net library.
I’m trying in this way, but its not working.
So Please help me out.
Main issue is I don’t know how to add multiple custom properties in log4net.
Please help me.
Server Side Code.
If any other setting is required, Please let me know.
Or is there any other way to do this, Please let me know.
To give you a more ‘elegant’ solution for this: use ndc.
using Nested diagnostic context in code (NDC):