I am creating a cross-platform app and would like to write some information to a log file. I know that I can dump it on the desktop or any number of unexpected places, but I am interested in placing it in the place where each operating system recommends. To complicate matters, systemd may be present and change expectations based on the platform.
Where is the expected place for Linux? And are there any other expectations I should be aware of (like if I need to put it in a folder with my company or app name)?