If the logs folder is not available the server will boot up fine, but crash as soon as a log entry is made.I think it's probably better to crash as soon as possible.
I did use the asynchronous versions of stat and access here, which may cause server boot to be aborted while it's doing other things. I'm not exactly sure if this could actually happen though nor that if it did whether that'd be harmful.
Any input on that is welcome. I can always switch the logic out of the synchronous versions. I don't think keeping the asynchronous version and only setting up the export when the logs folder has been verified would work.
Another solution of course would be to add the logs folder to the repository itself, but I'm leaning toward creating it if necessary to keep the repository clear of 'empty' folders.
If the
logs
folder is not available the server will boot up fine, but crash as soon as a log entry is made.I think it's probably better to crash as soon as possible.I did use the asynchronous versions of
stat
andaccess
here, which may cause server boot to be aborted while it's doing other things. I'm not exactly sure if this could actually happen though nor that if it did whether that'd be harmful.Any input on that is welcome. I can always switch the logic out of the synchronous versions. I don't think keeping the asynchronous version and only setting up the export when the
logs
folder has been verified would work.Another solution of course would be to add the
logs
folder to the repository itself, but I'm leaning toward creating it if necessary to keep the repository clear of 'empty' folders.