Here's the logging problem.
There is an asp.net website. The main feature of the website is a list of emails (saved in the db). Every time there is an error, data is saved by nlog to a file. The website has an admin panel. The admin panel lists reads the error log of the website.
There is a worker. The worker connects to Exchange Server and it checks for emails with a matching subject. Emails that match a pattern are saved to the db. Every time there is an error, data is saved by nlog to a different file.
Both the website and the worker use the same logger class. The settings in the web.config of the website and the application.config of the worker just point to a different target file.
Here is the new feature. The admin panel should list down the errors of the worker too. Now, I have multiple ways to go about that.
Option 1: The website will figure out where the worker log file is, then it will read the worker log file.
Option 2: Make a new worker/party. This will handle logging for both the website and the worker. It can save both sets of errors in a single log, or maybe even a new table in the database.
Option 3: Configure both the website and the worker file to point to the same target file, although, I do not know the directory structure of the azure file system.
What would be the cleanest way to go about it?