mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +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:
parent
4f01392000
commit
2f44db6700
1 changed files with 6 additions and 0 deletions
|
|
@ -103,6 +103,12 @@ File FileLogger::getSystemLogFileFolder()
|
||||||
{
|
{
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
return File ("~/Library/Logs");
|
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
|
#else
|
||||||
return File::getSpecialLocation (File::userApplicationDataDirectory);
|
return File::getSpecialLocation (File::userApplicationDataDirectory);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue