My computer is used for website development. As part of the website application, I have created log files, which previously had been stored in /var/log/webapps/appname (where appname varies per function). These files were left in place during macOS upgrades as expected.
Some time during Mojave or Catalina, these log files were removed upon an OS upgrade. So I moved the location out of /var/log and into my user space into /Users/jas/Websites/RepHunter/log/webapps/. That has not helped--upon any OS upgrade, the log files and directories are removed. This is an annoyance.
Now I have noticed that these log files get removed by the system between system upgrades at some random-seeming time.
I do not use tools such as Onyx to remove log files.
What can I do to find out what is causing this undesired log file removal and stop it?
EDIT:
- Web server is apache. Have never had the removal of logs until recently.
~
but who knows till we catch it in the act. Are you using Apache or some other server? Sorry for question upon question. Hopefully someone knows what’s cleaning the logs.chflags -R sappnd /Users/jas/Websites/RepHunter/log/webapps/
if you only append to the logs./var/logs/install.log
perhaps?/volumes/<name>
(if nothing went wrong) and nothing will be there to be deleted (it will be treated like an external data disk and macOS shouldn't touch it). You can also create snapshots of that volume using Carbon Copy Cloner.