Where to store debug output?
Posted: Wed Dec 21, 2011 10:36 am
Hi,
I'm currently porting a windows app to linux (must run on CentOS, RedHat and Ubuntu). At windows, I wrote some error-logs to %TEMP% path.
But what is the correct place for logfiles on Linux?
I try'd to write to /var/log/, but my app is not allowed to create a new file here (only root, but my app never runs with root permissions).
Can I use OpenFile() to write to some log that is declared for such use? For example stderr? But how can the user then see the content?
I'm new to Linux development and this is somewhat confusing.
Kukulkan
I'm currently porting a windows app to linux (must run on CentOS, RedHat and Ubuntu). At windows, I wrote some error-logs to %TEMP% path.
But what is the correct place for logfiles on Linux?
I try'd to write to /var/log/, but my app is not allowed to create a new file here (only root, but my app never runs with root permissions).
Can I use OpenFile() to write to some log that is declared for such use? For example stderr? But how can the user then see the content?
I'm new to Linux development and this is somewhat confusing.
Kukulkan