I'm new to .NET and to webservice development, so i'm not exactly sure how to implement the requirement i have.
- My webservice gets a POST request with some data, which i need to process to generate a pdf file: name_YYYYMMDDHHmmss.pdf.
- For monitoring this i want to have a separate logfile for each request, named like the output file: name_YYYYMMDDHHmmss.log
- I would like to avoid passing a config object into every class/function in which i need to add stuff to the log file
I've managed to install Serilog and it works for what i need, but not when i get concurrent requests. I'm also not exactly sure how simultaneous requests are handled in .NET (i have no thread specific code written so far), but as far as i can tell, when i change Global Logger file name, that object is shared across all threads so all of them write to the same file.
I've looked at a bunch of solutions, but i haven't managed to find nothing that suits this, and it seems most people have everything into 1 file...
Is there any clue or tips you can give me? I'm open to using something other than Serilog.