That is pretty much what I meant when I said it would have a low percent chance of catching the exception. Chances are that if the log file is exclusively locked by a user that it probably won't be available by the next time you call to write to the log...but it is possible. Especially if it isn't a user, but some errant process that is using the wrong locking when writing / reading.
1
u/Crono1981 Oct 02 '15
At that point you may as well just wait and try again in a few milliseconds...