I chose log4Net after much considerations to be my Logging application so please no arguments on that
OK, hear is my problem
- I got a single process connected to multiple Clients
- Each Client has a unique ID stored as a String in its own separate Thread
Each Client with the same unique ID can connect multiple times
I want to create a log file for every Client in a different .txt file.
- At every new connection, i want to create a log file with client ID appended by Date Time and seconds
This scenario has got me confused since i also don't have any previous logging experience of any application at all.
I hope i have made my scenario clear enough :)
Thank-you guys for all your answers and help but after lots and lots and lots of searching i finally found the answer .... not only i can create multiple Files but with dynamic file names.Hope this helps you guys as well :)
The idea is not to be based on a config file because as everybody said, one Appender is associated with one file name so one might be able to give one appender a dynamic file name but still not N number of File names
so my configuration is as follows
[UPDATE]: Actually you dont even need any config Yes, my configuration is empty, since i plan on to create dynamic configurations
Here is the code:
Main:
Functions:
Now, what we do is create a logger with a specified name, and fetch it whenever and wherever we want in any thread or any class, one can even fetch a created appender and modify it if required by using the command
and iterating through it. So actually everything is Dynamic :)
Woops forgot to add in the orignal source: Log4Net Mail archive