Commit 0a60192a authored by Jeremy Huddleston's avatar Jeremy Huddleston

XQuartz: Enable logging to a file for better debugging

Signed-off-by: default avatarJeremy Huddleston <jeremyhu@apple.com>
parent de4023f1
......@@ -589,6 +589,13 @@ void OsVendorFatalError( void )
void OsVendorInit(void)
{
if (serverGeneration == 1) {
char *lf;
char *home = getenv("HOME");
assert(home);
assert(0 < asprintf(&lf, "%s/Library/Logs/X11.%s.log", home, bundle_id_prefix));
LogInit(lf, ".old");
free(lf);
DarwinPrintBanner();
#ifdef ENABLE_DEBUG_LOG
{
......
......@@ -73,6 +73,9 @@ extern int darwinDesiredDepth;
extern int darwinMainScreenX;
extern int darwinMainScreenY;
// bundle-main.c
extern char *bundle_id_prefix;
#define ENABLE_DEBUG_LOG 1
#ifdef ENABLE_DEBUG_LOG
......
......@@ -88,7 +88,7 @@ asm (".desc ___crashreporter_info__, 0x10");
static const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
static char *bundle_id_prefix = NULL;
char *bundle_id_prefix = NULL;
static char *server_bootstrap_name = NULL;
#define DEBUG 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment