xf86LogInit: log to XDG_DATA_HOME when not running as root

When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not
running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to
log to the default /var/log/... when it is not running as root.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Hans de Goede 2014-04-01 11:24:17 +02:00 • committed by Peter Hutterer
commit 9d65c515d8
5 changed files with 49 additions and 4 deletions

View file

@ -51,6 +51,12 @@
/* Default logfile prefix */
#undef DEFAULT_LOGPREFIX
/* Default XDG_DATA dir under HOME */
#undef DEFAULT_XDG_DATA_HOME
/* Default log dir under XDG_DATA_HOME */
#undef DEFAULT_XDG_DATA_HOME_LOGDIR
/* Building DRI-capable DDX. */
#undef XF86DRI