diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2012-08-16 13:02:28 -0700 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2012-08-16 19:44:00 -0700 |
commit | ad123071e54d890d36d1373f59b8a6eb4937e936 (patch) | |
tree | e8024622b944275c11f1ab53b91c00a0f0c88546 | |
parent | 7c3d2e4828deb4e8ec38e8ef88d6f92b2d931033 (diff) |
XQuartz: Use asl_log_descriptor on Mountain Lion
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r-- | hw/xquartz/mach-startup/bundle-main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index cabdf1eab..b40366244 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -563,8 +563,25 @@ setup_console_redirect(const char *bundle_id) free(asl_facility); asl_set_filter(aslc, ASL_FILTER_MASK_UPTO(ASL_LEVEL_WARNING)); + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +# if MAC_OS_X_VERSION_MIN_REQUIRED < 1080 + if (asl_log_descriptor) +# endif + { + asl_log_descriptor(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO, ASL_LOG_DESCRIPTOR_WRITE); + asl_log_descriptor(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO, ASL_LOG_DESCRIPTOR_WRITE); + } +# if MAC_OS_X_VERSION_MIN_REQUIRED < 1080 + else { + xq_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); + xq_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); + } +# endif +#else xq_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); xq_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); +#endif } static void |