Hello guys.
i have a web application which present the many web services to my users. now i want to create a log class to log the events. i have couple questions:
1- i have a text file which all my logs stored in it. now if two functions at the same time try to access the file? how can managed the log writing process?
2- how can log the users IP address?
3- how can log the start up and shutting down the web application?
simply i want my log class work something like this:
Log.error("Can't insert/update email item :" +email.toString(), e, IP);
which e is an exception and IP is the user ip address.
I'm new in asp.net and i really appropriate you guys if you can give me idea how is the best way to this. i mean do how can make my log file more clear and easy to find the errors.
and if there was a sample code its will be great.