XQuartz: Enable logging to a file for better debugging

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston 2011-04-24 22:01:48 -07:00
parent de4023f194
commit 0a60192a85
3 changed files with 11 additions and 1 deletions

View File

@ -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
{

View File

@ -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

View File

@ -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