I have an application that can run only one instance at a time, however, if the 2nd instance is started, it must be registered in the general log file, which the first can also use.
I have a check on how many instances are running, and I planned to just register it in the event log first, but the application can work in a user or system context, and exceptions are thrown when trying to request the source of the event log so that the idea is canceled, since the security logs are not available for the user.
So, I wanted to know that the safest way to have 2 separate instances of the same application for writing to the log file is that it will provide them with the ability to write.
I would prefer not to use the existing additional structure if it can be avoided
Any help appreciated.
source
share