1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Change log file directory for linux

According to the specification at
https://specifications.freedesktop.org/basedir-spec/1.8/ar01s03.html
XDG_STATE_HOME should be used for "actions history", which includes
logs.
This commit is contained in:
Martijn Otto 2021-08-26 14:31:43 +02:00
parent 4f01392000
commit 2f44db6700

View file

@ -103,6 +103,12 @@ File FileLogger::getSystemLogFileFolder()
{
#if JUCE_MAC
return File ("~/Library/Logs");
#elif JUCE_LINUX
const char* state = getenv("XDG_STATE_HOME");
if (state != nullptr)
return File (state);
else
return File ("~/.local/state");
#else
return File::getSpecialLocation (File::userApplicationDataDirectory);
#endif