Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to log GUID/ session Id along with logger information using log4net?

I need GUID & seesion iD to be added as prefix for each of the trace output/logger input updated in the log file using log4net. Any suggestion for this ?
Posted

1 solution

In my Zeta Enterprise Library [^] I implemented a wrapper around log4net.

In this wrapper I also provide events to subscribe to in an application that uses the library. In these events you could add GUIDs or other context information.

Maybe you want to take a look at the sources to get the idea and use log4net in a similar way in your app.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900