aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/apple/apple_glx.c
diff options
context:
space:
mode:
authorJeremy Huddleston <[email protected]>2012-04-28 23:19:42 -0700
committerJeremy Huddleston <[email protected]>2012-05-03 10:58:34 -0700
commit51691f0767f6a75a1f549cd979a878a0ad12a228 (patch)
tree86685afa697ba08d558e26c86ba5880c53c547d1 /src/glx/apple/apple_glx.c
parentcf5db0a418b63d71385b43897a7ea9be7bb785d1 (diff)
darwin: Use ASL for logging
Signed-off-by: Jeremy Huddleston <[email protected]>
Diffstat (limited to 'src/glx/apple/apple_glx.c')
-rw-r--r--src/glx/apple/apple_glx.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c
index d94c1e0fb16..56cff64a15b 100644
--- a/src/glx/apple/apple_glx.c
+++ b/src/glx/apple/apple_glx.c
@@ -33,6 +33,8 @@
#include <assert.h>
#include <stdarg.h>
#include <dlfcn.h>
+#include <pthread.h>
+#include <inttypes.h>
#include "appledri.h"
#include "apple_glx.h"
#include "apple_glx_context.h"
@@ -43,22 +45,6 @@ static int dri_event_base = 0;
const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
-static bool diagnostic = false;
-
-void
-apple_glx_diagnostic(const char *fmt, ...)
-{
- va_list vl;
-
- if (diagnostic) {
- fprintf(stderr, "DIAG: ");
-
- va_start(vl, fmt);
- vfprintf(stderr, fmt, vl);
- va_end(vl);
- }
-}
-
int
apple_get_dri_event_base(void)
{
@@ -125,10 +111,9 @@ apple_init_glx(Display * dpy)
if (initialized)
return false;
- if (getenv("LIBGL_DIAGNOSTIC")) {
- printf("initializing libGL in %s\n", __func__);
- diagnostic = true;
- }
+ apple_glx_log_init();
+
+ apple_glx_log(ASL_LEVEL_INFO, "Initializing libGL.");
apple_cgl_init();
(void) apple_glx_get_client_id();